summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2016-07-19 01:47:27 -0700
committerFerenc Kovacs <tyra3l@gmail.com>2016-07-21 02:16:22 +0200
commita41745061b77398663eaa5721a804568f8fc217b (patch)
treeb4979273b0019562514a7c155c5ccbd4cc658ecf
parenta48f64c403b05da244cfd30399bffd53e910a440 (diff)
downloadphp-git-a41745061b77398663eaa5721a804568f8fc217b.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 b9c4c2878e..9481e3fd1d 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -889,6 +889,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));