avformat/utils: Use avio_closep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b88e80589b
commit
2959a61232
@ -496,7 +496,7 @@ fail:
|
|||||||
ff_id3v2_free_extra_meta(&id3v2_extra_meta);
|
ff_id3v2_free_extra_meta(&id3v2_extra_meta);
|
||||||
av_dict_free(&tmp);
|
av_dict_free(&tmp);
|
||||||
if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO))
|
if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO))
|
||||||
avio_close(s->pb);
|
avio_closep(&s->pb);
|
||||||
avformat_free_context(s);
|
avformat_free_context(s);
|
||||||
*ps = NULL;
|
*ps = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user