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.
This commit is contained in:
Ola Fornander 2024-10-22 11:00:05 +02:00 committed by Arun Raghavan
parent ec972d4fdf
commit 12c8cdf69b

View file

@ -289,7 +289,7 @@ compare_device_session_priority (const void *a,
static void do_add_nodes(GstPipeWireDeviceProvider *self) static void do_add_nodes(GstPipeWireDeviceProvider *self)
{ {
struct node_data *nd; struct node_data *nd;
GList *new_devices = NULL; g_autoptr (GList) new_devices = NULL;
GList *l; GList *l;
spa_list_for_each(nd, &self->nodes, link) { spa_list_for_each(nd, &self->nodes, link) {