mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
fix spider memleaks #137863
Original commit message from CVS: fix spider memleaks #137863
This commit is contained in:
parent
915be2e2c7
commit
fbf80ae696
2 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-07-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
patch by: Sebastien Cote <sc5 at hermes.usherb.ca>
|
||||||
|
|
||||||
|
* gst/autoplug/gstspider.c: (gst_spider_init),
|
||||||
|
(gst_spider_dispose):
|
||||||
|
fix spider memleaks. fixes #137863
|
||||||
|
|
||||||
2004-07-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-07-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
patch by: Joe Marcus Clarke <marcus at freebsd dot org>
|
patch by: Joe Marcus Clarke <marcus at freebsd dot org>
|
||||||
|
|
|
@ -182,8 +182,10 @@ gst_spider_init (GstSpider * spider)
|
||||||
{
|
{
|
||||||
/* use only elements which have sources and sinks and where the sinks have caps */
|
/* use only elements which have sources and sinks and where the sinks have caps */
|
||||||
/* FIXME: How do we handle factories that are added after the spider was constructed? */
|
/* FIXME: How do we handle factories that are added after the spider was constructed? */
|
||||||
spider->factories = gst_autoplug_factories_filters_with_sink_caps ((GList *)
|
GList *list = gst_registry_pool_feature_list (GST_TYPE_ELEMENT_FACTORY);
|
||||||
gst_registry_pool_feature_list (GST_TYPE_ELEMENT_FACTORY));
|
|
||||||
|
spider->factories = gst_autoplug_factories_filters_with_sink_caps (list);
|
||||||
|
g_list_free (list);
|
||||||
|
|
||||||
spider->links = NULL;
|
spider->links = NULL;
|
||||||
|
|
||||||
|
@ -198,11 +200,21 @@ static void
|
||||||
gst_spider_dispose (GObject * object)
|
gst_spider_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
GstSpider *spider;
|
GstSpider *spider;
|
||||||
|
GList *list;
|
||||||
|
|
||||||
spider = GST_SPIDER (object);
|
spider = GST_SPIDER (object);
|
||||||
g_list_free (spider->factories);
|
g_list_free (spider->factories);
|
||||||
spider->factories = NULL;
|
spider->factories = NULL;
|
||||||
|
|
||||||
|
for (list = spider->links; list; list = list->next) {
|
||||||
|
GstSpiderConnection *conn = list->data;
|
||||||
|
|
||||||
|
g_list_free (conn->path);
|
||||||
|
g_free (conn);
|
||||||
|
}
|
||||||
|
g_list_free (spider->links);
|
||||||
|
spider->links = NULL;
|
||||||
|
|
||||||
((GObjectClass *) parent_class)->dispose (object);
|
((GObjectClass *) parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
static GstPad *
|
static GstPad *
|
||||||
|
|
Loading…
Reference in a new issue