]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: Drop superfluous conditionals around qemu_opts_del()
authorMarkus Armbruster <armbru@redhat.com>
Mon, 29 Sep 2014 14:07:55 +0000 (16:07 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 3 Oct 2014 09:30:33 +0000 (10:30 +0100)
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>
blockdev.c
qemu-img.c
qemu-nbd.c

index ad436488b7f08b178af192cd89aadfec931d37d3..2f441c53433370daa836400e942b2079d0416e84 100644 (file)
@@ -224,9 +224,7 @@ void drive_info_del(DriveInfo *dinfo)
     if (!dinfo) {
         return;
     }
-    if (dinfo->opts) {
-        qemu_opts_del(dinfo->opts);
-    }
+    qemu_opts_del(dinfo->opts);
     g_free(dinfo->id);
     QTAILQ_REMOVE(&drives, dinfo, next);
     g_free(dinfo->serial);
index ea4bbae546b20e8366143f72e53809b0ea31b594..27b85dbda4365a90e5261a4d8a75eb7b46a9d386 100644 (file)
@@ -1736,9 +1736,7 @@ out:
     qemu_opts_del(opts);
     qemu_opts_free(create_opts);
     qemu_vfree(buf);
-    if (sn_opts) {
-        qemu_opts_del(sn_opts);
-    }
+    qemu_opts_del(sn_opts);
     if (out_bs) {
         bdrv_unref(out_bs);
     }
index fa603382d4ee28dd871f80b28194b5c9b0d21cc1..b524b3420f8e20512fb13baea68211aa76d336b7 100644 (file)
@@ -778,9 +778,7 @@ int main(int argc, char **argv)
         unlink(sockpath);
     }
 
-    if (sn_opts) {
-        qemu_opts_del(sn_opts);
-    }
+    qemu_opts_del(sn_opts);
 
     if (device) {
         void *ret;