mirror of https://github.com/GNOME/gimp.git
plug-ins: fix a memory leak in file-png
Found using clang's scan-build.
This commit is contained in:
parent
f4bf93dac9
commit
14bb38da3f
|
@ -1868,7 +1868,9 @@ respin_cmap (png_structp pp,
|
|||
*/
|
||||
if (colors == 0)
|
||||
{
|
||||
before = g_new0 (guchar, 3);
|
||||
before = g_newa (guchar, 3);
|
||||
memset (before, 0, sizeof (guchar) * 3);
|
||||
|
||||
colors = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue