From 12c8cdf69b1f47c9c8b5201870aacdade7664052 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 dc4f5234e..461003803 100644 --- a/src/gst/gstpipewiredeviceprovider.c +++ b/src/gst/gstpipewiredeviceprovider.c @@ -289,7 +289,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) {