diff --git a/_webp.c b/_webp.c index 806472ab4..cb872bc28 100644 --- a/_webp.c +++ b/_webp.c @@ -75,6 +75,7 @@ PyObject* WebPDecode_wrapper(PyObject* self, PyObject* args) } if (vp8_status_code != VP8_STATUS_OK) { + WebPFreeDecBuffer(&config.output); Py_RETURN_NONE; }