summaryrefslogtreecommitdiffstats
path: root/mplayer.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 /mplayer.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 'mplayer.c')
-rw-r--r--mplayer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mplayer.c b/mplayer.c
index b44e272599..28439d05c7 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -655,7 +655,7 @@ int volstep = 3;
static void mp_dvdnav_context_free(MPContext *ctx){
if (ctx->nav_smpi) free_mp_image(ctx->nav_smpi);
ctx->nav_smpi = NULL;
- if (ctx->nav_buffer) free(ctx->nav_buffer);
+ free(ctx->nav_buffer);
ctx->nav_buffer = NULL;
ctx->nav_start = NULL;
ctx->nav_in_size = 0;
@@ -814,7 +814,7 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc)
talloc_free(mpctx->key_fifo);
- if(edl_records != NULL) free(edl_records); // free mem allocated for EDL
+ free(edl_records); // free mem allocated for EDL
edl_records = NULL;
switch(how) {
case EXIT_QUIT:
@@ -2108,8 +2108,7 @@ static void mp_dvdnav_save_smpi(struct MPContext *mpctx, int in_size,
if (mpctx->stream->type != STREAMTYPE_DVDNAV)
return;
- if (mpctx->nav_buffer)
- free(mpctx->nav_buffer);
+ free(mpctx->nav_buffer);
mpctx->nav_buffer = malloc(in_size);
mpctx->nav_start = start;