mirror of https://github.com/xemu-project/xemu.git
Drop superfluous conditionals around qemu_opts_del()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
7251711472
commit
4ad608803c
|
@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj)
|
||||||
NamedGPIOList *ngl, *next;
|
NamedGPIOList *ngl, *next;
|
||||||
|
|
||||||
DeviceState *dev = DEVICE(obj);
|
DeviceState *dev = DEVICE(obj);
|
||||||
if (dev->opts) {
|
qemu_opts_del(dev->opts);
|
||||||
qemu_opts_del(dev->opts);
|
|
||||||
}
|
|
||||||
|
|
||||||
QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {
|
QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {
|
||||||
QLIST_REMOVE(ngl, node);
|
QLIST_REMOVE(ngl, node);
|
||||||
|
|
|
@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr)
|
||||||
}
|
}
|
||||||
g_free(chr->filename);
|
g_free(chr->filename);
|
||||||
g_free(chr->label);
|
g_free(chr->label);
|
||||||
if (chr->opts) {
|
qemu_opts_del(chr->opts);
|
||||||
qemu_opts_del(chr->opts);
|
|
||||||
}
|
|
||||||
g_free(chr);
|
g_free(chr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue