possible null deref

master
Pierre Joye 2016-07-20 17:00:16 +07:00
parent e29a140290
commit 0dd1706c14
1 changed files with 1 additions and 1 deletions

View File

@ -1055,7 +1055,7 @@ gdImageScaleTwoPass(const gdImagePtr src, const unsigned int new_width,
scale_pass_res = _gdScalePass(tmp_im, src_height, dst, new_height, new_width, VERTICAL);
if (scale_pass_res != 1) {
gdImageDestroy(dst);
if (src != tmp_im && tmp_im != NULL) {
if (tmp != NULL && src != tmp_im) {
gdImageDestroy(tmp_im);
}
return NULL;