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>
* gst/schedulers/gstoptimalscheduler.c:
{
/* 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;
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 *