mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-13 01:32:18 +03:00
fix memory leak
This commit is contained in:
parent
295382aadc
commit
98042cd4b7
|
@ -615,6 +615,10 @@ ImagingResampleInner(Imaging imIn, int xsize, int ysize,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
imOut = imIn = imTemp;
|
imOut = imIn = imTemp;
|
||||||
|
} else {
|
||||||
|
// Free in any case
|
||||||
|
free(bounds_horiz);
|
||||||
|
free(kk_horiz);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* second pass */
|
/* second pass */
|
||||||
|
@ -633,6 +637,10 @@ ImagingResampleInner(Imaging imIn, int xsize, int ysize,
|
||||||
if ( ! imOut) {
|
if ( ! imOut) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Free in any case
|
||||||
|
free(bounds_vert);
|
||||||
|
free(kk_vert);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* none of the previous steps are performed, copying */
|
/* none of the previous steps are performed, copying */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user