avformat/mov: fix memleaks
Fix two cases of memleaks: 1. The leak of dv_demux 2. The leak of dv_fctx upon dv_demux allocate failure Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
61f5c6ab06
commit
f3dc38a186
@ -7357,10 +7357,9 @@ static int mov_read_close(AVFormatContext *s)
|
|||||||
av_freep(&sc->coll);
|
av_freep(&sc->coll);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mov->dv_demux) {
|
av_freep(&mov->dv_demux);
|
||||||
avformat_free_context(mov->dv_fctx);
|
avformat_free_context(mov->dv_fctx);
|
||||||
mov->dv_fctx = NULL;
|
mov->dv_fctx = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
if (mov->meta_keys) {
|
if (mov->meta_keys) {
|
||||||
for (i = 1; i < mov->meta_keys_count; i++) {
|
for (i = 1; i < mov->meta_keys_count; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user