mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
avformat/riffdec: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5dfae3f40a
commit
fd3e7447c8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user