libavcodec/tiffenc: Use av_freep() avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 18 Nov 2014 10:33:00 +0000 (11:33 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 18 Nov 2014 10:33:58 +0000 (11:33 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/tiffenc.c

index 38ff780..5f3324b 100644 (file)
@@ -420,7 +420,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         }
     }
     if (s->compr == TIFF_LZW)
-        av_free(s->lzws);
+        av_freep(&s->lzws);
     }
 
     s->num_entries = 0;