changeset 9585:89a31cf91a05

Fix some memleaks
author albeu
date Fri, 14 Mar 2003 17:45:33 +0000
parents 31126ea5cd36
children 2cc1ce724722
files asxparser.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/asxparser.c	Fri Mar 14 17:42:21 2003 +0000
+++ b/asxparser.c	Fri Mar 14 17:45:33 2003 +0000
@@ -477,6 +477,8 @@
     return;
   }
   play_tree_set_param(pt,name,val);
+  free(name);
+  if(val) free(val);
 }
 
 static void
@@ -516,11 +518,13 @@
   stream=open_stream(href,0,&f);
   if(!stream) {
     mp_msg(MSGT_PLAYTREE,MSGL_WARN,"Can't open playlist %s\n",href);
+    free(href);
     return NULL;
   }
   if(stream->type != STREAMTYPE_PLAYLIST) {
     mp_msg(MSGT_PLAYTREE,MSGL_WARN,"URL %s dont point to a playlist\n",href);
     free_stream(stream);
+    free(href);
     return NULL;
   }
 
@@ -532,7 +536,7 @@
 
   play_tree_parser_free(ptp);
   free_stream(stream);
-
+  free(href);
   //mp_msg(MSGT_PLAYTREE,MSGL_INFO,"Need to implement entryref\n");
     
   return pt;