From 4f891542a563b6ca406ca18979a8343ab534df21 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 27 Feb 2017 10:29:15 +0100 Subject: [PATCH] python/ext/py-{source,sink}.c: free string uri --- python/ext/py-sink.c | 3 +++ python/ext/py-source.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/python/ext/py-sink.c b/python/ext/py-sink.c index 53db845e..12eb0ec1 100644 --- a/python/ext/py-sink.c +++ b/python/ext/py-sink.c @@ -127,6 +127,9 @@ Py_sink_del (Py_sink *self, PyObject *unused) { del_aubio_sink(self->o); free(self->mwrite_data.data); + if (self->uri) { + free(self->uri); + } Py_TYPE(self)->tp_free((PyObject *) self); } diff --git a/python/ext/py-source.c b/python/ext/py-source.c index bc78292a..60108d33 100644 --- a/python/ext/py-source.c +++ b/python/ext/py-source.c @@ -164,6 +164,9 @@ Py_source_del (Py_source *self, PyObject *unused) del_aubio_source(self->o); free(self->c_mread_to.data); } + if (self->uri) { + free(self->uri); + } Py_XDECREF(self->read_to); Py_XDECREF(self->mread_to); Py_TYPE(self)->tp_free((PyObject *) self); -- 2.11.0