diff --git a/spa/plugins/filter-graph/filter-graph.c b/spa/plugins/filter-graph/filter-graph.c index 2ef3794ef..693b08200 100644 --- a/spa/plugins/filter-graph/filter-graph.c +++ b/spa/plugins/filter-graph/filter-graph.c @@ -1644,8 +1644,6 @@ static void unsetup_graph(struct graph *graph) graph->output = NULL; free(graph->hndl); graph->hndl = NULL; - free(graph->control_port); - graph->control_port = NULL; } static int setup_graph(struct graph *graph) @@ -2128,6 +2126,8 @@ static void graph_free(struct graph *graph) for (i = 0; i < graph->n_output_names; i++) free(graph->output_names[i]); free(graph->output_names); + free(graph->control_port); + graph->control_port = NULL; } static const struct spa_filter_graph_methods impl_filter_graph = {