From 1cb2079d6c54cb383937880f1eae78975e1a757d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 23 Oct 2017 15:26:08 +0200 Subject: Fix memory leak --- ext/gd/libgd/wbmp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/gd') 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); -- cgit v1.2.1