Merge pull request #5798 from ilai-deutel/fix-webp-memory-leak

WebP: Fix memory leak during decoding on failure
This commit is contained in:
Andrew Murray 2021-12-05 14:54:16 +11:00 committed by GitHub
commit 06372b5e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -392,6 +392,7 @@ _anim_decoder_new(PyObject *self, PyObject *args) {
return (PyObject *)decp; return (PyObject *)decp;
} }
} }
WebPDataClear(&(decp->data));
} }
PyObject_Del(decp); PyObject_Del(decp);
} }