mirror of https://github.com/xemu-project/xemu.git
vl.c: select_machine(): use g_autoptr
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
e9945a8781
commit
0e460ac329
system
|
@ -1667,7 +1667,7 @@ static MachineClass *select_machine(QDict *qdict, Error **errp)
|
||||||
{
|
{
|
||||||
ERRP_GUARD();
|
ERRP_GUARD();
|
||||||
const char *machine_type = qdict_get_try_str(qdict, "type");
|
const char *machine_type = qdict_get_try_str(qdict, "type");
|
||||||
GSList *machines = object_class_get_list(TYPE_MACHINE, false);
|
g_autoptr(GSList) machines = object_class_get_list(TYPE_MACHINE, false);
|
||||||
MachineClass *machine_class = NULL;
|
MachineClass *machine_class = NULL;
|
||||||
|
|
||||||
if (machine_type) {
|
if (machine_type) {
|
||||||
|
@ -1683,7 +1683,6 @@ static MachineClass *select_machine(QDict *qdict, Error **errp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_free(machines);
|
|
||||||
if (!machine_class) {
|
if (!machine_class) {
|
||||||
error_append_hint(errp,
|
error_append_hint(errp,
|
||||||
"Use -machine help to list supported machines\n");
|
"Use -machine help to list supported machines\n");
|
||||||
|
|
Loading…
Reference in New Issue