From 8cf51c47c0961a10a5f7eecb9c20209f101137e2 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 10 May 2016 23:21:37 +0200 Subject: [PATCH] python/ext/py-phasevoc.c: make sure to avoid double free --- python/ext/py-phasevoc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.11.0