Free leaked g_timer on early return
authorJan Schmidt <thaytan@mad.scientist.com>
Tue, 9 Mar 2004 13:33:11 +0000 (13:33 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Tue, 9 Mar 2004 13:33:11 +0000 (13:33 +0000)
Original commit message from CVS:
Free leaked g_timer on early return

ChangeLog
gst/registries/gstxmlregistry.c

index 41d29c5..3b36df1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-10  Jan Schmidt  <thaytan@mad.scientist.com>
+
+       * gst/registries/gstxmlregistry.c: (gst_xml_registry_load):
+       Free a leaked g_timer on early returns.
+
 2004-03-08  Ronald Bultje  <rbultje@ronald.bitfreak.net>
 
        * docs/pwg/advanced-types.xml:
index f7fb670..b7870fb 100644 (file)
@@ -590,6 +590,7 @@ gst_xml_registry_load (GstRegistry *registry)
   xmlregistry->context = g_markup_parse_context_new (&gst_xml_registry_parser, 0, registry, NULL);
 
   if (!CLASS (xmlregistry)->open_func (xmlregistry, GST_XML_REGISTRY_READ)) {
+    g_timer_destroy (timer);
     return FALSE;
   }
 
@@ -605,6 +606,7 @@ gst_xml_registry_load (GstRegistry *registry)
       GST_ERROR ("parsing registry: %s\n", error->message);
       g_free (text);
       CLASS (xmlregistry)->close_func (xmlregistry);
+      g_timer_destroy (timer);
       return FALSE;
     }