diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-13 12:09:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-13 12:09:32 +0200 |
commit | 84d74610f9d27077e9260b544ae52d732e92e5de (patch) | |
tree | 086f9c32df888a206ca69cdf7b3e0f6f5403c7be /libavformat/mov.c | |
parent | a6b3e6d0b49b47c9b874e59b88a8051af338f520 (diff) | |
download | ffmpeg-84d74610f9d27077e9260b544ae52d732e92e5de.tar.gz |
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>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 5b81ba8723..234c1f5ce1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2782,6 +2782,7 @@ static int mov_read_close(AVFormatContext *s) av_freep(&sc->drefs); if (sc->pb && sc->pb != s->pb) avio_close(sc->pb); + sc->pb = NULL; av_freep(&sc->chunk_offsets); av_freep(&sc->keyframes); av_freep(&sc->sample_sizes); |