diff options
-rw-r--r-- | src/sink.c | 21 | ||||
-rw-r--r-- | src/sink.h | 1 |
2 files changed, 11 insertions, 11 deletions
@@ -22,18 +22,9 @@ void sink_list_alloc(GArray **sink_list) { } /* - * frees a complete sink array - */ -void sink_list_free(GArray *sink_list) { - for (int i = 0; i < sink_list->len; ++i) - sink_clear(&g_array_index(sink_list, sink_info, i)); - g_array_free(sink_list, true); -} - -/* * frees all dynamic allocated components of a sink */ -void sink_clear(sink_info* sink) { +static void sink_clear(sink_info* sink) { if (sink->name != NULL) free(sink->name); @@ -44,3 +35,13 @@ void sink_clear(sink_info* sink) { sink_input_list_clear(sink->input_list, &sink->input_max); } +/* + * frees a complete sink array + */ +void sink_list_free(GArray *sink_list) { + for (int i = 0; i < sink_list->len; ++i) + sink_clear(&g_array_index(sink_list, sink_info, i)); + g_array_free(sink_list, true); +} + + @@ -28,6 +28,5 @@ void sink_check_input_list(sink_info*); void sink_list_alloc(GArray **sink_list); void sink_list_free(GArray *sink_list); -void sink_clear(sink_info*); #endif |