block: Drop superfluous conditionals around qemu_opts_del()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1411999675-14533-1-git-send-email-armbru@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Markus Armbruster 2014-09-29 16:07:55 +02:00 committed by Stefan Hajnoczi
parent 18fe46d79a
commit fbf28a4328
3 changed files with 3 additions and 9 deletions

View File

@ -224,9 +224,7 @@ void drive_info_del(DriveInfo *dinfo)
if (!dinfo) { if (!dinfo) {
return; return;
} }
if (dinfo->opts) { qemu_opts_del(dinfo->opts);
qemu_opts_del(dinfo->opts);
}
g_free(dinfo->id); g_free(dinfo->id);
QTAILQ_REMOVE(&drives, dinfo, next); QTAILQ_REMOVE(&drives, dinfo, next);
g_free(dinfo->serial); g_free(dinfo->serial);

View File

@ -1736,9 +1736,7 @@ out:
qemu_opts_del(opts); qemu_opts_del(opts);
qemu_opts_free(create_opts); qemu_opts_free(create_opts);
qemu_vfree(buf); qemu_vfree(buf);
if (sn_opts) { qemu_opts_del(sn_opts);
qemu_opts_del(sn_opts);
}
if (out_bs) { if (out_bs) {
bdrv_unref(out_bs); bdrv_unref(out_bs);
} }

View File

@ -778,9 +778,7 @@ int main(int argc, char **argv)
unlink(sockpath); unlink(sockpath);
} }
if (sn_opts) { qemu_opts_del(sn_opts);
qemu_opts_del(sn_opts);
}
if (device) { if (device) {
void *ret; void *ret;