Commit 0357f836 authored by Michael Henning's avatar Michael Henning

plug-ins: fix memory leak in file-mng

Found using clang's scan-build.
parent c262fee2
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment