Commit fd3e7447 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/riffdec: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5dfae3f4
...@@ -132,7 +132,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size, int big_ ...@@ -132,7 +132,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size, int big_
size -= 22; size -= 22;
} }
if (cbSize > 0) { if (cbSize > 0) {
av_free(codec->extradata); av_freep(&codec->extradata);
if (ff_get_extradata(codec, pb, cbSize) < 0) if (ff_get_extradata(codec, pb, cbSize) < 0)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
size -= cbSize; size -= cbSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment