Merge branch 'PHP-5.6' into PHP-7.0

* PHP-5.6:
  improve fix #72558, while (u>=0) with unsigned int will always be true
This commit is contained in:
Pierre Joye 2016-07-19 15:53:25 +07:00
commit bc8c722cb4

View File

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