diff mbox series

[FFmpeg-devel,31/34] avformat/tee: Fix leak of FIFO-options dictionary

Message ID AM7PR03MB66603D93A8CA82C470A8363E8FD29@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,01/11] avformat/mux: Sanitize packets without data and side-data
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 6, 2021, 2:27 a.m. UTC
Happened for all slaves which didn't use the FIFO.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/tee.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libavformat/tee.c b/libavformat/tee.c
index 03356da6c0..4129954172 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -125,6 +125,7 @@  static int close_slave(TeeSlave *tee_slave)
     unsigned i;
     int ret = 0;
 
+    av_dict_free(&tee_slave->fifo_options);
     avf = tee_slave->avf;
     if (!avf)
         return 0;
@@ -230,6 +231,7 @@  static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
 
         av_dict_free(&options);
         options = tee_slave->fifo_options;
+        tee_slave->fifo_options = NULL;
     }
     ret = avformat_alloc_output_context2(&avf2, NULL,
                                          tee_slave->use_fifo ? "fifo" :format, filename);