mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
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;
|
||||
|
||||
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_REMOVE(ngl, node);
|
||||
|
@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr)
|
||||
}
|
||||
g_free(chr->filename);
|
||||
g_free(chr->label);
|
||||
if (chr->opts) {
|
||||
qemu_opts_del(chr->opts);
|
||||
}
|
||||
qemu_opts_del(chr->opts);
|
||||
g_free(chr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user