summaryrefslogtreecommitdiffstats
path: root/asxparser.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-11-07 12:47:40 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-08 18:05:12 +0200
commit12d3e0df9980822282f70dffad148b729dbee541 (patch)
treed298b2c8f5039eae7aeeb16dfd927bea0efcc134 /asxparser.c
parentaf4b23cd36cff0dc34cde59c6a154fd080d11216 (diff)
downloadmpv-12d3e0df9980822282f70dffad148b729dbee541.tar.bz2
mpv-12d3e0df9980822282f70dffad148b729dbee541.tar.xz
cleanup: don't check for NULL before free()
patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'asxparser.c')
-rw-r--r--asxparser.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/asxparser.c b/asxparser.c
index 56820a0e7f..9ad0935726 100644
--- a/asxparser.c
+++ b/asxparser.c
@@ -88,7 +88,7 @@ asx_parser_new(struct m_config *mconfig)
void
asx_parser_free(ASX_Parser_t* parser) {
if(!parser) return;
- if(parser->ret_stack) free(parser->ret_stack);
+ free(parser->ret_stack);
free(parser);
}
@@ -290,7 +290,7 @@ asx_get_element(ASX_Parser_t* parser,char** _buffer,
if(*ptr3 == '\0') {
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : EOB reached while parsing %s element body",parser->line,element);
free(element);
- if(attribs) free(attribs);
+ free(attribs);
return -1;
}
if(ptr3[0] == '\n') parser->line++;
@@ -318,7 +318,7 @@ asx_get_element(ASX_Parser_t* parser,char** _buffer,
if(ptr4 == NULL || ptr4[1] == '\0') {
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : EOB reached while parsing %s element body",parser->line,element);
free(element);
- if(attribs) free(attribs);
+ free(attribs);
return -1;
}
if(ptr4[1] != '/' && strncasecmp(element,ptr4+1,strlen(element)) == 0) {
@@ -407,7 +407,7 @@ asx_parse_param(ASX_Parser_t* parser, char** attribs, play_tree_t* pt) {
}
play_tree_set_param(pt,name,val);
free(name);
- if(val) free(val);
+ free(val);
}
static void
@@ -499,7 +499,7 @@ asx_parse_entry(ASX_Parser_t* parser,char* buffer,char** _attribs) {
nref++;
} else
mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Ignoring element %s\n",element);
- if(body) free(body);
+ free(body);
asx_free_attribs(attribs);
}
@@ -565,7 +565,7 @@ asx_parse_repeat(ASX_Parser_t* parser,char* buffer,char** _attribs) {
asx_parse_param(parser,attribs,repeat);
} else
mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Ignoring element %s\n",element);
- if(body) free(body);
+ free(body);
asx_free_attribs(attribs);
}
@@ -650,7 +650,7 @@ asx_parser_build_tree(struct m_config *mconfig, char* buffer,int deep) {
}
} else
mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Ignoring element %s\n",element);
- if(body) free(body);
+ free(body);
asx_free_attribs(attribs);
}