diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index c64b3a9d92..54f2f56dba 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -623,7 +623,7 @@ static int flv_read_close(AVFormatContext *s) static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size) { - av_free(st->codec->extradata); + av_freep(&st->codec->extradata); if (ff_get_extradata(st->codec, s->pb, size) < 0) return AVERROR(ENOMEM); return 0;