Message ID | 20230722062641.18505-1-akihiko.odaki@daynix.com |
---|---|
State | New |
Headers | show |
Series | vl: Free machine list | expand |
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
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>
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);
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(-)