avcodec/h264_parser: Use av_freep() to avoid leaving stale pointers
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 30 Oct 2014 22:58:52 +0000 (23:58 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 30 Oct 2014 22:58:52 +0000 (23:58 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264_parser.c

index 7b9fd1a..5a62f5c 100644 (file)
@@ -547,7 +547,7 @@ static void close(AVCodecParserContext *s)
     H264Context *h   = s->priv_data;
     ParseContext *pc = &h->parse_context;
 
-    av_free(pc->buffer);
+    av_freep(&pc->buffer);
     ff_h264_free_context(h);
 }