Free leaked g_timer on early return

Original commit message from CVS:
Free leaked g_timer on early return
This commit is contained in:
Jan Schmidt 2004-03-09 13:33:11 +00:00
parent 27d587b023
commit e36f583bab
2 changed files with 7 additions and 0 deletions

View file

@ -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:

View 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;
}