fprint-list-supported-devices: Do not double-free usb_list

We were leaking the spi_list instead.
This commit is contained in:
Marco Trevisan (Treviño)
2023-03-15 14:50:41 +01:00
parent bb5feeca77
commit 677c50fc51

View File

@@ -132,7 +132,7 @@ main (int argc, char **argv)
g_print ("%s", (char *) l->data); g_print ("%s", (char *) l->data);
g_print ("\n"); 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 ("## SPI devices\n");
g_print ("\n"); g_print ("\n");
@@ -146,7 +146,7 @@ main (int argc, char **argv)
g_print ("%s", (char *) l->data); g_print ("%s", (char *) l->data);
g_print ("\n"); 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); g_hash_table_destroy (printed);