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:
@@ -114,7 +114,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
|
|||||||
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;
|
||||||
|
Reference in New Issue
Block a user