summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Siloti <[email protected]>2017-07-18 11:26:39 -0700
committerMichael Niedermayer <[email protected]>2017-09-17 12:21:32 +0200
commit16ee4057077b05e89a784cce1a17ec49b5e46ad2 (patch)
tree3073990e2bea0ce84ca82a518bd72f908c69909e
parent19938f1a11355a199135c7411eab5fbf026a4ffb (diff)
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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 949debd1d1df3a96315b3a3083831162845c1188) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index cea3ab5a93..3e59e50bb1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -4172,8 +4172,8 @@ void avformat_free_context(AVFormatContext *s)
av_freep(&s->chapters);
av_dict_free(&s->metadata);
av_freep(&s->streams);
- av_freep(&s->internal);
flush_packet_queue(s);
+ av_freep(&s->internal);
av_free(s);
}