* [PATCH] vl: Free machine list
@ 2023-07-22 6:26 Akihiko Odaki
2023-09-21 7:11 ` Akihiko Odaki
2023-09-21 10:13 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Akihiko Odaki @ 2023-07-22 6:26 UTC (permalink / raw)
Cc: qemu-devel, Paolo Bonzini, Akihiko Odaki
Free machine list and make LeakSanitizer happy.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
softmmu/vl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index b0b96f67fa..802f728298 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1484,7 +1484,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);
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] vl: Free machine list
2023-07-22 6:26 [PATCH] vl: Free machine list Akihiko Odaki
@ 2023-09-21 7:11 ` Akihiko Odaki
2023-09-21 10:13 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Akihiko Odaki @ 2023-09-21 7:11 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On 2023/07/22 15:26, Akihiko Odaki wrote:
> Free machine list and make LeakSanitizer happy.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> softmmu/vl.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index b0b96f67fa..802f728298 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -1484,7 +1484,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);
Hi Paolo,
Can you have a look at this patch?
Regards,
Akihiko Odaki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vl: Free machine list
2023-07-22 6:26 [PATCH] vl: Free machine list Akihiko Odaki
2023-09-21 7:11 ` Akihiko Odaki
@ 2023-09-21 10:13 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-09-21 10:13 UTC (permalink / raw)
To: Akihiko Odaki; +Cc: qemu-devel, Paolo Bonzini
On 22/7/23 08:26, Akihiko Odaki wrote:
> Free machine list and make LeakSanitizer happy.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> softmmu/vl.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index b0b96f67fa..802f728298 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -1484,7 +1484,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);
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-21 10:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-22 6:26 [PATCH] vl: Free machine list Akihiko Odaki
2023-09-21 7:11 ` Akihiko Odaki
2023-09-21 10:13 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).