]> granicus.if.org Git - php/commitdiff
Fix memory leak
authorAnatol Belski <ab@php.net>
Mon, 23 Oct 2017 13:26:08 +0000 (15:26 +0200)
committerAnatol Belski <ab@php.net>
Mon, 23 Oct 2017 13:26:08 +0000 (15:26 +0200)
ext/gd/libgd/wbmp.c

index 605d0b57352f345f5fb844ca866d0ec12093c0bc..4c3eeee7df8cb1d1b23b023cee070c6c04390d2d 100644 (file)
@@ -164,7 +164,10 @@ readwbmp (int (*getin) (void *in), void *in, Wbmp ** return_wbmp)
     }
 
   if (skipheader (getin, in))
-    return (-1);
+    {
+      gdFree (wbmp);
+      return (-1);
+    }
 
 
   wbmp->width = getmbi (getin, in);