--- gstreamer-0.8.1-orig/gst/autoplug/gstspider.c	2004-04-13 11:33:34.000000000 -0400
+++ gstreamer-0.8.1/gst/autoplug/gstspider.c	2004-05-03 09:31:02.000000000 -0400
@@ -182,8 +182,9 @@
 {
   /* 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 +199,21 @@
 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 *
