summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-10-23 15:40:05 +0200
committerAnatol Belski <ab@php.net>2017-10-23 15:40:05 +0200
commit5b497797f2983b91d6d6819491b828e90e992071 (patch)
treea1fd09a3e2a53691306d8f0a6f971d3a8fcdef9e /ext/gd
parent0a3ea6091c6875a8358c40538a663a8abdc3189a (diff)
parent1cb2079d6c54cb383937880f1eae78975e1a757d (diff)
downloadphp-git-5b497797f2983b91d6d6819491b828e90e992071.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix memory leak
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/libgd/wbmp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/gd/libgd/wbmp.c b/ext/gd/libgd/wbmp.c
index 605d0b5735..4c3eeee7df 100644
--- a/ext/gd/libgd/wbmp.c
+++ b/ext/gd/libgd/wbmp.c
@@ -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);