Drop unneeded checks before av_free() and change to av_freep() where it's more suitable.
[ffmpeg.git] / libavcodec / smacker.c
index 162c68a..2d4c1e2 100644 (file)
@@ -550,14 +550,10 @@ static int decode_end(AVCodecContext *avctx)
 {
     SmackVContext * const smk = (SmackVContext *)avctx->priv_data;
 
-    if(smk->mmap_tbl)
-        av_free(smk->mmap_tbl);
-    if(smk->mclr_tbl)
-        av_free(smk->mclr_tbl);
-    if(smk->full_tbl)
-        av_free(smk->full_tbl);
-    if(smk->type_tbl)
-        av_free(smk->type_tbl);
+    av_freep(&smk->mmap_tbl);
+    av_freep(&smk->mclr_tbl);
+    av_freep(&smk->full_tbl);
+    av_freep(&smk->type_tbl);
 
     if (smk->pic.data[0])
         avctx->release_buffer(avctx, &smk->pic);