From: Paul Brossier Date: Tue, 10 May 2016 21:21:37 +0000 (+0200) Subject: python/ext/py-phasevoc.c: make sure to avoid double free X-Git-Tag: 0.4.4~300^2~83 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=8cf51c47c0961a10a5f7eecb9c20209f101137e2 python/ext/py-phasevoc.c: make sure to avoid double free --- diff --git a/python/ext/py-phasevoc.c b/python/ext/py-phasevoc.c index 62312eaa..a08bb5c1 100644 --- a/python/ext/py-phasevoc.c +++ b/python/ext/py-phasevoc.c @@ -84,7 +84,9 @@ Py_pvoc_del (Py_pvoc *self, PyObject *unused) { Py_XDECREF(self->output); Py_XDECREF(self->routput); - del_aubio_pvoc(self->o); + if (self->o) { + del_aubio_pvoc(self->o); + } Py_TYPE(self)->tp_free((PyObject *) self); }