Commit 7134af3d authored by Jens Georg's avatar Jens Georg
Browse files

Do not hand out libxml2-allocated strings

We can't use xml_util_get_child_element_content_glib as this early-exits and
we need to collect all values that can occur.

On top of that, don't add empty list entries.
parent f16a62e7
......@@ -952,9 +952,18 @@ gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info)
for (element = element->children; element; element = element->next) {
/* No early exit since the node explicitly may appear multiple
* times: */
if (!strcmp ("X_DLNADOC", (char *) element->name))
if (!strcmp ("X_DLNADOC", (char *) element->name)) {
xmlChar *content = NULL;
content = xmlNodeGetContent (element);
if (content == NULL)
list = g_list_prepend (list,
g_strdup ((char *) content));
xmlFree (content);
/* Return in order of appearance in document */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment