mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
multipartdemux: don't leak dynamic pads
Free the dynamic pads data in finalize. Fixes #581432
This commit is contained in:
parent
0f1033c59f
commit
3f2144c5ee
1 changed files with 8 additions and 0 deletions
|
@ -192,6 +192,12 @@ gst_multipart_demux_init (GstMultipartDemux * multipart,
|
||||||
multipart->autoscan = DEFAULT_AUTOSCAN;
|
multipart->autoscan = DEFAULT_AUTOSCAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_multipart_pad_free (GstMultipartPad * mppad)
|
||||||
|
{
|
||||||
|
g_free (mppad->mime);
|
||||||
|
g_free (mppad);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_multipart_demux_finalize (GObject * object)
|
gst_multipart_demux_finalize (GObject * object)
|
||||||
|
@ -201,6 +207,8 @@ gst_multipart_demux_finalize (GObject * object)
|
||||||
g_object_unref (demux->adapter);
|
g_object_unref (demux->adapter);
|
||||||
g_free (demux->boundary);
|
g_free (demux->boundary);
|
||||||
g_free (demux->mime_type);
|
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);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue