diff asxparser.c @ 17803:51b992a72b17

Fix possible use of body uninitialized. Remove an unneeded free (body is not allocated before it). CID 243 and more
author rtognimp
date Fri, 10 Mar 2006 22:15:50 +0000
parents e7c8200ffdc5
children 682a16136d6c
line wrap: on
line diff
--- a/asxparser.c	Fri Mar 10 21:34:54 2006 +0000
+++ b/asxparser.c	Fri Mar 10 22:15:50 2006 +0000
@@ -644,7 +644,7 @@
 
 play_tree_t*
 asx_parser_build_tree(char* buffer,int deep) {
-  char *element,*asx_body,**asx_attribs,*body, **attribs;
+  char *element,*asx_body,**asx_attribs,*body = NULL, **attribs;
   int r;
   play_tree_t *asx,*entry,*list = NULL;
   ASX_Parser_t* parser = asx_parser_new();
@@ -666,7 +666,6 @@
   if(strcasecmp(element,"ASX") != 0) {
     mp_msg(MSGT_PLAYTREE,MSGL_ERR,"first element isn't ASX, it's %s\n",element);
     asx_free_attribs(asx_attribs);
-    if(body) free(body);
     asx_parser_free(parser);
     return NULL;
   }