From: Arnout Vandecappelle Date: Tue, 5 May 2009 15:03:29 +0000 (+0200) Subject: multipartdemux: don't leak dynamic pads X-Git-Tag: RELEASE-0.10.15~222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f2144c5eea3b84bee28fc7424814931ba6bc63c;p=platform%2Fupstream%2Fgst-plugins-good.git multipartdemux: don't leak dynamic pads Free the dynamic pads data in finalize. Fixes #581432 --- diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c index 8a6be44..5f6c707 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); }