summaryrefslogtreecommitdiffstats
path: root/gst/multipart
diff options
context:
space:
mode:
authorArnout Vandecappelle <arnout@mind.be>2009-05-05 17:03:29 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-05-05 17:03:29 +0200
commit3f2144c5eea3b84bee28fc7424814931ba6bc63c (patch)
tree17a7f89f4a93e58757f481f0f06aaee297ab88aa /gst/multipart
parent0f1033c59f0e8c4ab637b29194ffdc0c03a81309 (diff)
multipartdemux: don't leak dynamic pads
Free the dynamic pads data in finalize. Fixes #581432
Diffstat (limited to 'gst/multipart')
-rw-r--r--gst/multipart/multipartdemux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c
index 8a6be443..5f6c7077 100644
--- a/gst/multipart/multipartdemux.c
+++ b/gst/multipart/multipartdemux.c
@@ -192,6 +192,12 @@ gst_multipart_demux_init (GstMultipartDemux * multipart,
multipart->autoscan = DEFAULT_AUTOSCAN;
}
+void
+gst_multipart_pad_free (GstMultipartPad * mppad)
+{
+ g_free (mppad->mime);
+ g_free (mppad);
+}
static void
gst_multipart_demux_finalize (GObject * object)
@@ -201,6 +207,8 @@ gst_multipart_demux_finalize (GObject * object)
g_object_unref (demux->adapter);
g_free (demux->boundary);
g_free (demux->mime_type);
+ g_slist_foreach (demux->srcpads, (GFunc) gst_multipart_pad_free, NULL);
+ g_slist_free (demux->srcpads);
G_OBJECT_CLASS (parent_class)->finalize (object);
}