summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2016-07-19 01:47:27 -0700
committerStanislav Malyshev <stas@php.net>2016-07-19 01:47:27 -0700
commit47d6ea6332d457f16ab4b33f42fdb62e66acb73f (patch)
treeb06ad7da56f33389e97d9947f6f68e4bf5a8c26a
parentf0a17b3a862399a77e54460b7f1b800bed4d6a69 (diff)
downloadphp-git-47d6ea6332d457f16ab4b33f42fdb62e66acb73f.tar.gz
Fix memory leak
-rw-r--r--ext/gd/libgd/gd_interpolation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index ca106add7c..37e14a1c0b 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -891,6 +891,7 @@ static inline LineContribType * _gdContributionsAlloc(unsigned int line_length,
res->WindowSize = windows_size;
res->LineLength = line_length;
if (overflow2(line_length, sizeof(ContributionType))) {
+ gdFree(res);
return NULL;
}
res->ContribRow = (ContributionType *) gdMalloc(line_length * sizeof(ContributionType));