python/ext/py-{source,sink}.c: free string uri
authorPaul Brossier <piem@piem.org>
Mon, 27 Feb 2017 09:29:15 +0000 (10:29 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 27 Feb 2017 09:29:15 +0000 (10:29 +0100)
python/ext/py-sink.c
python/ext/py-source.c

index 53db845..12eb0ec 100644 (file)
@@ -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);
 }
 
index bc78292..60108d3 100644 (file)
@@ -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);