Fix leak of destination image in ImagingUnsharpMask when an error occurs
This commit is contained in:
parent
eaab435403
commit
a9bcd7db88
@ -2226,6 +2226,7 @@ _unsharp_mask(ImagingObject *self, PyObject *args) {
|
||||
}
|
||||
|
||||
if (!ImagingUnsharpMask(imOut, imIn, radius, percent, threshold)) {
|
||||
ImagingDelete(imOut);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user