mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +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;
|
||||
}
|
||||
imOut = imIn = imTemp;
|
||||
} else {
|
||||
// Free in any case
|
||||
free(bounds_horiz);
|
||||
free(kk_horiz);
|
||||
}
|
||||
|
||||
/* second pass */
|
||||
|
@ -633,6 +637,10 @@ ImagingResampleInner(Imaging imIn, int xsize, int ysize,
|
|||
if ( ! imOut) {
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
// Free in any case
|
||||
free(bounds_vert);
|
||||
free(kk_vert);
|
||||
}
|
||||
|
||||
/* none of the previous steps are performed, copying */
|
||||
|
|
Loading…
Reference in New Issue
Block a user