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:
Markus Armbruster 2014-12-03 11:28:02 +01:00 committed by Michael Tokarev
parent 7251711472
commit 4ad608803c
2 changed files with 2 additions and 6 deletions

View File

@ -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);

View File

@ -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);
}