projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f69362d
)
improve fix #72558, while (u>=0) with unsigned int will always be true
author
Pierre Joye
<pierre.php@gmail.com>
Tue, 19 Jul 2016 08:51:43 +0000
(15:51 +0700)
committer
Pierre Joye
<pierre.php@gmail.com>
Tue, 19 Jul 2016 08:51:43 +0000
(15:51 +0700)
ext/gd/libgd/gd_interpolation.c
patch
|
blob
|
history
diff --git
a/ext/gd/libgd/gd_interpolation.c
b/ext/gd/libgd/gd_interpolation.c
index 9481e3fd1dd4f8cd959ebbd79ccb95026dcb12ed..9a7789e365f798828dc1415ee0d0eab6f06df220 100644
(file)
--- a/
ext/gd/libgd/gd_interpolation.c
+++ b/
ext/gd/libgd/gd_interpolation.c
@@
-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;
}
}