summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 7151e4febc..47179e5e54 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -393,7 +393,9 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
return 0;
fail:
- avfilter_graph_free(graph);
+ for (; graph->filter_count > 0; graph->filter_count--)
+ avfilter_free(graph->filters[graph->filter_count - 1]);
+ av_freep(&graph->filters);
free_inout(open_inputs);
free_inout(open_outputs);
free_inout(curr_inputs);