From 677c50fc516b21d91888ccfd498c918d5014e8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 15 Mar 2023 14:50:41 +0100 Subject: [PATCH] fprint-list-supported-devices: Do not double-free usb_list We were leaking the spi_list instead. --- libfprint/fprint-list-supported-devices.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfprint/fprint-list-supported-devices.c b/libfprint/fprint-list-supported-devices.c index 132a72f0..ace5de09 100644 --- a/libfprint/fprint-list-supported-devices.c +++ b/libfprint/fprint-list-supported-devices.c @@ -132,7 +132,7 @@ main (int argc, char **argv) g_print ("%s", (char *) l->data); g_print ("\n"); - g_list_free_full (usb_list, g_free); + g_list_free_full (g_steal_pointer (&usb_list), g_free); g_print ("## SPI devices\n"); g_print ("\n"); @@ -146,7 +146,7 @@ main (int argc, char **argv) g_print ("%s", (char *) l->data); g_print ("\n"); - g_list_free_full (usb_list, g_free); + g_list_free_full (g_steal_pointer (&spi_list), g_free); g_hash_table_destroy (printed);