From fc8d59fa6f4ca410fcbf88b54aee3a4fbf73c47f Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Thu, 30 Oct 2014 23:58:52 +0100
Subject: [PATCH] avcodec/h264_parser: Use av_freep() to avoid leaving stale
 pointers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavcodec/h264_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 7b9fd1a7668..5a62f5c95c4 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -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);
 }
 
-- 
GitLab