[totem-pl-parser] plparse: Fix small memleaks in XSPF parser



commit f57dccd64c1b829f70b44448c07ca52421c284b1
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Jul 13 11:14:04 2013 +0200

    plparse: Fix small memleaks in XSPF parser

 plparse/totem-pl-parser-xspf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser-xspf.c b/plparse/totem-pl-parser-xspf.c
index 7cbc76c..7acf13a 100644
--- a/plparse/totem-pl-parser-xspf.c
+++ b/plparse/totem-pl-parser-xspf.c
@@ -334,6 +334,7 @@ parse_xspf_track (TotemPlParser *parser, GFile *base_file, xmlDocPtr doc,
                                        }
                                }
                        }
+                       g_clear_pointer (&app, xmlFree);
                /* Parse Amazon AMZ extensions */
                } else if (g_ascii_strcasecmp ((char *)node->name, "meta") == 0) {
                        xmlChar *rel;
@@ -346,6 +347,7 @@ parse_xspf_track (TotemPlParser *parser, GFile *base_file, xmlDocPtr doc,
                                        id = xmlNodeListGetString (doc, node->xmlChildrenNode, 1);
                                else if (g_ascii_strcasecmp ((char *) rel, 
"http://www.amazon.com/dmusic/fileSize";) == 0)
                                        filesize = xmlNodeListGetString (doc, node->xmlChildrenNode, 1);
+                               xmlFree (rel);
                        }
                } else if (g_ascii_strcasecmp ((char *)node->name, "album") == 0)
                        album = xmlNodeListGetString (doc, node->xmlChildrenNode, 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]