fix spider memleaks #137863

Original commit message from CVS:
fix spider memleaks #137863
This commit is contained in:
Thomas Vander Stichele 2004-07-06 12:00:53 +00:00
parent 915be2e2c7
commit fbf80ae696
2 changed files with 22 additions and 2 deletions

View file

@ -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>
patch by: Joe Marcus Clarke <marcus at freebsd dot org>

View file

@ -182,8 +182,10 @@ gst_spider_init (GstSpider * spider)
{
/* 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? */
spider->factories = gst_autoplug_factories_filters_with_sink_caps ((GList *)
gst_registry_pool_feature_list (GST_TYPE_ELEMENT_FACTORY));
GList *list = 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;
@ -198,11 +200,21 @@ static void
gst_spider_dispose (GObject * object)
{
GstSpider *spider;
GList *list;
spider = GST_SPIDER (object);
g_list_free (spider->factories);
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);
}
static GstPad *