added free buffer if there's a problem decoding

This commit is contained in:
wiredfool 2013-05-16 10:45:47 -07:00
parent 5712126d3c
commit a7d778eba4

View File

@ -75,6 +75,7 @@ PyObject* WebPDecode_wrapper(PyObject* self, PyObject* args)
} }
if (vp8_status_code != VP8_STATUS_OK) { if (vp8_status_code != VP8_STATUS_OK) {
WebPFreeDecBuffer(&config.output);
Py_RETURN_NONE; Py_RETURN_NONE;
} }