From 437fb1c87d7b4b0730db97d0858b4f39fffff2a9 Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Thu, 3 Feb 2011 02:09:36 +0100 Subject: Remove a few if (p) av_free(p) forms Signed-off-by: Mans Rullgard --- libavcodec/flashsv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libavcodec/flashsv.c') diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 08748c65d1..f5ffca08ac 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -133,8 +133,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, /* the block size could change between frames, make sure the buffer * is large enough, if not, get a larger one */ if(s->block_size < s->block_width*s->block_height) { - if (s->tmpblock != NULL) - av_free(s->tmpblock); + av_free(s->tmpblock); if ((s->tmpblock = av_malloc(3*s->block_width*s->block_height)) == NULL) { av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); return -1; @@ -243,8 +242,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx) avctx->release_buffer(avctx, &s->frame); /* free the tmpblock */ - if (s->tmpblock != NULL) - av_free(s->tmpblock); + av_free(s->tmpblock); return 0; } -- cgit v1.2.3