aboutsummaryrefslogtreecommitdiff
path: root/block/iscsi.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-06-06 18:25:12 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-16 17:23:19 +0800
commitf7047c2daf760385edf83df10be4259bea190e75 (patch)
treea84a3315f0b8d6f393037032da42b78beccb47b3 /block/iscsi.c
parentb25c9dff3599892a16f824b5df643e0fc1acbfc1 (diff)
block: Drop superfluous conditionals around g_free()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r--block/iscsi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index 877b877cf2..38bfdb61a2 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1434,9 +1434,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
out:
qemu_opts_del(opts);
- if (initiator_name != NULL) {
- g_free(initiator_name);
- }
+ g_free(initiator_name);
if (iscsi_url != NULL) {
iscsi_destroy_url(iscsi_url);
}