plug-ins: fix memory leak in file-mng

Found using clang's scan-build.
This commit is contained in:
Michael Henning 2013-01-17 19:23:15 -05:00
parent c262fee244
commit 0357f83658
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}