From f40bfb587d652fd54f371ae6f9530ebe2e9106f9 Mon Sep 17 00:00:00 2001 From: Ola Fornander Date: Tue, 22 Oct 2024 11:00:05 +0200 Subject: [PATCH] gst: deviceprovider: fix memory leak in do_add_nodes Use `g_autoptr()` to free the new_devices GList that is allocated in do_add_nodes. --- src/gst/gstpipewiredeviceprovider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gst/gstpipewiredeviceprovider.c b/src/gst/gstpipewiredeviceprovider.c index 23a470a29..363ca3e25 100644 --- a/src/gst/gstpipewiredeviceprovider.c +++ b/src/gst/gstpipewiredeviceprovider.c @@ -277,7 +277,7 @@ compare_device_session_priority (const void *a, static void do_add_nodes(GstPipeWireDeviceProvider *self) { struct node_data *nd; - GList *new_devices = NULL; + g_autoptr (GList) new_devices = NULL; GList *l; spa_list_for_each(nd, &self->nodes, link) {