changeset 36145:47edff322a99

Fix memory leak.
author reimar
date Sun, 05 May 2013 17:02:31 +0000
parents 43bff9dd44be
children 5950fc0d4b53
files asxparser.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/asxparser.c	Sun May 05 17:02:30 2013 +0000
+++ b/asxparser.c	Sun May 05 17:02:31 2013 +0000
@@ -389,7 +389,7 @@
 
 static void
 asx_parse_param(ASX_Parser_t* parser, char** attribs, play_tree_t* pt) {
-  char *name,*val;
+  char *name = NULL,*val = NULL;
 
   name = asx_get_attrib("NAME",attribs);
   if(!name) {
@@ -403,10 +403,11 @@
       mp_msg(MSGT_PLAYTREE,MSGL_WARN,"=%s\n",val);
     else
       mp_msg(MSGT_PLAYTREE,MSGL_WARN,"\n");
-    return;
+    goto err_out;
   }
   mp_msg(MSGT_PLAYTREE, MSGL_ERR, "Support for specifying parameters in playlists has been disabled.\n");
 //  play_tree_set_param(pt,name,val);
+err_out:
   free(name);
   free(val);
 }