mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst/gstregistryxml.c: Strings allocated by libxml2 should be freed with xmlFree(), not with g_free(). Fixes issues on...
Original commit message from CVS: Patch by: Fabrizio Gennari <fabrizio.ge at tiscali it> * gst/gstregistryxml.c: (read_string), (load_feature): Strings allocated by libxml2 should be freed with xmlFree(), not with g_free(). Fixes issues on windows in certain contexts (#519698).
This commit is contained in:
parent
97bf2d2d78
commit
96aa08f008
2 changed files with 20 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-03-01 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
Patch by: Fabrizio Gennari <fabrizio.ge at tiscali it>
|
||||||
|
|
||||||
|
* gst/gstregistryxml.c: (read_string), (load_feature):
|
||||||
|
Strings allocated by libxml2 should be freed with xmlFree(), not
|
||||||
|
with g_free(). Fixes issues on windows in certain contexts (#519698).
|
||||||
|
|
||||||
2008-02-29 Tim-Philipp Müller <tim at centricular dot net>
|
2008-02-29 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/gstinterface.c: (gst_element_implements_interface):
|
* gst/gstinterface.c: (gst_element_implements_interface):
|
||||||
|
|
|
@ -123,9 +123,15 @@ read_string (xmlTextReaderPtr reader, gchar ** write_to, gboolean allow_blank)
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_TEXT) {
|
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_TEXT) {
|
||||||
|
xmlChar *value;
|
||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
*write_to = (gchar *) xmlTextReaderValue (reader);
|
|
||||||
|
value = xmlTextReaderValue (reader);
|
||||||
|
*write_to = g_strdup ((gchar *) value);
|
||||||
|
xmlFree (value);
|
||||||
|
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,21 +261,20 @@ load_feature (xmlTextReaderPtr reader)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int depth;
|
int depth;
|
||||||
gchar *feature_name;
|
xmlChar *feature_name;
|
||||||
GstPluginFeature *feature;
|
GstPluginFeature *feature;
|
||||||
GType type;
|
GType type;
|
||||||
|
|
||||||
depth = xmlTextReaderDepth (reader);
|
depth = xmlTextReaderDepth (reader);
|
||||||
feature_name =
|
feature_name = xmlTextReaderGetAttribute (reader, BAD_CAST "typename");
|
||||||
(gchar *) xmlTextReaderGetAttribute (reader, BAD_CAST "typename");
|
|
||||||
|
|
||||||
GST_LOG ("loading feature");
|
GST_LOG ("loading feature '%s'", GST_STR_NULL ((const char *) feature_name));
|
||||||
|
|
||||||
if (!feature_name)
|
if (!feature_name)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
type = g_type_from_name (feature_name);
|
type = g_type_from_name ((const char *) feature_name);
|
||||||
g_free (feature_name);
|
xmlFree (feature_name);
|
||||||
feature_name = NULL;
|
feature_name = NULL;
|
||||||
|
|
||||||
if (!type) {
|
if (!type) {
|
||||||
|
|
Loading…
Reference in a new issue