diff options
author | Steven Siloti <ssiloti@bittorrent.com> | 2017-07-18 11:26:39 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-05 23:24:02 +0200 |
commit | 949debd1d1df3a96315b3a3083831162845c1188 (patch) | |
tree | 744a6fd0b09970e791de9033f91777f9e2288b99 /libavformat | |
parent | 013ec23cbe5d78a04b1b6c00c43f45773e45e7e5 (diff) | |
download | ffmpeg-949debd1d1df3a96315b3a3083831162845c1188.tar.gz |
avformat/utils: fix memory leak in avformat_free_context
The pointer to the packet queue is stored in the internal structure
so the queue needs to be flushed before internal is freed.
Signed-off-by: Steven Siloti <ssiloti@bittorrent.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 38d247c6cd..58283616dc 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4333,8 +4333,8 @@ void avformat_free_context(AVFormatContext *s) av_dict_free(&s->metadata); av_dict_free(&s->internal->id3v2_meta); av_freep(&s->streams); - av_freep(&s->internal); flush_packet_queue(s); + av_freep(&s->internal); av_free(s); } |