Skip to content

Commit

Permalink
Merge branch 'PHP-5.6' into PHP-7.0
Browse files Browse the repository at this point in the history
* PHP-5.6:
  improve fix #72558, while (u>=0) with unsigned int will always be true
  improve fix #72558, while (u>=0) with unsigned int will always be true
  • Loading branch information
smalyshev committed Jul 19, 2016
2 parents 9698082 + 894df05 commit caa96c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ext/gd/libgd/gd_interpolation.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,11 +904,12 @@ static inline LineContribType * _gdContributionsAlloc(unsigned int line_length,
res->ContribRow[u].Weights = (double *) gdMalloc(windows_size * sizeof(double));
}
if (overflow_error == 1 || res->ContribRow[u].Weights == NULL) {
unsigned int i;
u--;
while (u >= 0) {
gdFree(res->ContribRow[u].Weights);
u--;
for (i=0;i<=u;i++) {
gdFree(res->ContribRow[i].Weights);
}
gdFree(res);
return NULL;
}
}
Expand Down

0 comments on commit caa96c4

Please sign in to comment.