From fd3e7447c83b7a652b66e3a4334e4335d232d77e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 22 Dec 2014 11:51:55 +0100 Subject: [PATCH] avformat/riffdec: Use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer --- libavformat/riffdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index edaf146d1c..f44df1e672 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -132,7 +132,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size, int big_ size -= 22; } if (cbSize > 0) { - av_free(codec->extradata); + av_freep(&codec->extradata); if (ff_get_extradata(codec, pb, cbSize) < 0) return AVERROR(ENOMEM); size -= cbSize;