summaryrefslogtreecommitdiffstats
path: root/subopt-helper.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 /subopt-helper.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 'subopt-helper.c')
-rw-r--r--subopt-helper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/subopt-helper.c b/subopt-helper.c
index 37c634b5ff..5a2f19ea40 100644
--- a/subopt-helper.c
+++ b/subopt-helper.c
@@ -226,8 +226,7 @@ int subopt_parse( char const * const str, const opt_t * opts )
tmp.str = NULL;
tmp.len = 0;
last = parse_str( &str[parse_pos], &tmp );
- if (*valp)
- free(*valp);
+ free(*valp);
*valp = NULL;
if (tmp.str && tmp.len > 0) {
*valp = malloc(tmp.len + 1);