mirror of https://git.ffmpeg.org/ffmpeg.git
mov: zero sc->pb in mov_read_close()
Its bad to free things without zeroing them. This fixes a potential issue when mov_read_close() would be called twice. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a6b3e6d0b4
commit
84d74610f9
|
@ -2782,6 +2782,7 @@ static int mov_read_close(AVFormatContext *s)
|
||||||
av_freep(&sc->drefs);
|
av_freep(&sc->drefs);
|
||||||
if (sc->pb && sc->pb != s->pb)
|
if (sc->pb && sc->pb != s->pb)
|
||||||
avio_close(sc->pb);
|
avio_close(sc->pb);
|
||||||
|
sc->pb = NULL;
|
||||||
av_freep(&sc->chunk_offsets);
|
av_freep(&sc->chunk_offsets);
|
||||||
av_freep(&sc->keyframes);
|
av_freep(&sc->keyframes);
|
||||||
av_freep(&sc->sample_sizes);
|
av_freep(&sc->sample_sizes);
|
||||||
|
|
Loading…
Reference in New Issue