Skip to content

Commit a9bcd7d

Browse files
committed
Fix leak of destination image in ImagingUnsharpMask when an error occurs
1 parent eaab435 commit a9bcd7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/_imaging.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,6 +2226,7 @@ _unsharp_mask(ImagingObject *self, PyObject *args) {
22262226
}
22272227

22282228
if (!ImagingUnsharpMask(imOut, imIn, radius, percent, threshold)) {
2229+
ImagingDelete(imOut);
22292230
return NULL;
22302231
}
22312232

0 commit comments

Comments
 (0)