Fix leak of destination image in ImagingUnsharpMask when an error occurs

This commit is contained in:
Eric Soroos 2025-05-13 19:50:55 +02:00
parent eaab435403
commit a9bcd7db88

View File

@ -2226,6 +2226,7 @@ _unsharp_mask(ImagingObject *self, PyObject *args) {
}
if (!ImagingUnsharpMask(imOut, imIn, radius, percent, threshold)) {
ImagingDelete(imOut);
return NULL;
}