mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix memory leak
This commit is contained in:
parent
f0a17b3a86
commit
47d6ea6332
1 changed files with 1 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue