diff mbox series

[FFmpeg-devel] fftools/ffmpeg_filter: initialize graph inputs/outputs

Message ID 20230317173105.16467-1-anton@khirnov.net
State Accepted
Commit 0ad64cdd92a132b57748bd8b84db955e1369f74e
Headers show
Series [FFmpeg-devel] fftools/ffmpeg_filter: initialize graph inputs/outputs | expand

Commit Message

Anton Khirnov March 17, 2023, 5:31 p.m. UTC
Avoids uninitialized free on error.

Found-by: Paul B Mahol
---
 fftools/ffmpeg_filter.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Paul B Mahol March 18, 2023, 9:34 a.m. UTC | #1
LGTM
diff mbox series

Patch

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 02d456c473..5d8398b9a8 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -446,6 +446,9 @@  static int graph_parse(AVFilterGraph *graph, const char *desc,
     AVFilterGraphSegment *seg;
     int ret;
 
+    *inputs  = NULL;
+    *outputs = NULL;
+
     ret = avfilter_graph_segment_parse(graph, desc, 0, &seg);
     if (ret < 0)
         return ret;