Fix memory leak

This commit is contained in:
Stanislav Malyshev 2016-07-19 01:47:27 -07:00
parent f0a17b3a86
commit 47d6ea6332

View file

@ -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));