mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
gst/registries/gstlibxmlregistry.c: plug more leaks. A simple gst_init() now is leakfree, yay.
Original commit message from CVS: * gst/registries/gstlibxmlregistry.c: (load_feature): plug more leaks. A simple gst_init() now is leakfree, yay.
This commit is contained in:
parent
c527fd8dad
commit
f3d8a28662
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* gst/registries/gstlibxmlregistry.c: (load_feature):
|
||||||
|
plug more leaks. A simple gst_init() now is leakfree, yay.
|
||||||
|
|
||||||
2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/registries/gstlibxmlregistry.c: (read_string), (load_paths),
|
* gst/registries/gstlibxmlregistry.c: (read_string), (load_paths),
|
||||||
|
|
|
@ -552,6 +552,7 @@ gst_xml_registry_close_func (GstXMLRegistry * registry)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* takes ownership of given value */
|
||||||
static void
|
static void
|
||||||
add_to_char_array (gchar *** array, gchar * value)
|
add_to_char_array (gchar *** array, gchar * value)
|
||||||
{
|
{
|
||||||
|
@ -756,17 +757,21 @@ load_feature (xmlTextReaderPtr reader)
|
||||||
} else if (g_ascii_strncasecmp (s, "source", 5) == 0) {
|
} else if (g_ascii_strncasecmp (s, "source", 5) == 0) {
|
||||||
factory->uri_type = GST_URI_SRC;
|
factory->uri_type = GST_URI_SRC;
|
||||||
}
|
}
|
||||||
|
g_free (s);
|
||||||
}
|
}
|
||||||
} else if (g_str_equal (tag, "uri_protocol")) {
|
} else if (g_str_equal (tag, "uri_protocol")) {
|
||||||
gchar *s = NULL;
|
gchar *s = NULL;
|
||||||
|
|
||||||
if (read_string (reader, &s))
|
if (read_string (reader, &s)) {
|
||||||
add_to_char_array (&factory->uri_protocols, s);
|
add_to_char_array (&factory->uri_protocols, s);
|
||||||
|
}
|
||||||
} else if (g_str_equal (tag, "interface")) {
|
} else if (g_str_equal (tag, "interface")) {
|
||||||
gchar *s = NULL;
|
gchar *s = NULL;
|
||||||
|
|
||||||
if (read_string (reader, &s))
|
if (read_string (reader, &s)) {
|
||||||
__gst_element_factory_add_interface (factory, s);
|
__gst_element_factory_add_interface (factory, s);
|
||||||
|
g_free (s);
|
||||||
|
}
|
||||||
} else if (g_str_equal (tag, "padtemplate")) {
|
} else if (g_str_equal (tag, "padtemplate")) {
|
||||||
GstStaticPadTemplate *template = load_pad_template (reader);
|
GstStaticPadTemplate *template = load_pad_template (reader);
|
||||||
|
|
||||||
|
@ -782,8 +787,9 @@ load_feature (xmlTextReaderPtr reader)
|
||||||
if (g_str_equal (tag, "extension")) {
|
if (g_str_equal (tag, "extension")) {
|
||||||
gchar *s = NULL;
|
gchar *s = NULL;
|
||||||
|
|
||||||
if (read_string (reader, &s))
|
if (read_string (reader, &s)) {
|
||||||
add_to_char_array (&factory->extensions, s);
|
add_to_char_array (&factory->extensions, s);
|
||||||
|
}
|
||||||
} else if (g_str_equal (tag, "caps")) {
|
} else if (g_str_equal (tag, "caps")) {
|
||||||
gchar *s = NULL;
|
gchar *s = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue