diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c index a022543045..5278ae08f5 100644 --- a/plug-ins/common/file-mng.c +++ b/plug-ins/common/file-mng.c @@ -469,7 +469,9 @@ respin_cmap (png_structp pp, /* Make sure there is something in the colormap */ if (colors == 0) { - before = g_new0 (guchar, 3); + before = g_newa (guchar, 3); + memset (before, 0, sizeof (guchar) * 3); + colors = 1; }