From 47d6ea6332d457f16ab4b33f42fdb62e66acb73f Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 19 Jul 2016 01:47:27 -0700 Subject: [PATCH] Fix memory leak --- ext/gd/libgd/gd_interpolation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index ca106add7c0..37e14a1c0b6 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));