]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vl: Free machine list
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sat, 22 Jul 2023 06:26:40 +0000 (15:26 +0900)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 7 Nov 2023 11:13:27 +0000 (12:13 +0100)
Free machine list and make LeakSanitizer happy.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230722062641.18505-1-akihiko.odaki@daynix.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
system/vl.c

index 3fb569254a0c5f4df35a18808dbe38f638677592..ff76eb0d07ce69fbc4340198aa24c8f4af6c0807 100644 (file)
@@ -1529,7 +1529,8 @@ static gint machine_class_cmp(gconstpointer a, gconstpointer b)
 
 static void machine_help_func(const QDict *qdict)
 {
-    GSList *machines, *el;
+    g_autoptr(GSList) machines = NULL;
+    GSList *el;
     const char *type = qdict_get_try_str(qdict, "type");
 
     machines = object_class_get_list(TYPE_MACHINE, false);