]> git.proxmox.com Git - qemu.git/commit
iscsi: use bdrv_new() instead of stack structure
authorFam Zheng <famz@redhat.com>
Fri, 23 Aug 2013 01:14:45 +0000 (09:14 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 6 Sep 2013 13:25:08 +0000 (15:25 +0200)
commit13c91cb7e28b47f5c4227f7e88a1378570117704
tree9029cb1b1bbaa97a0b23ec89a89d8a2c4694fe1a
parent3d34c6cd99f434126365150c2535bbf93b94f891
iscsi: use bdrv_new() instead of stack structure

BlockDriverState structure needs bdrv_new() to initialize refcnt, don't
allocate a local structure variable and memset to 0, becasue with coming
refcnt implementation, bdrv_unref will crash if bs->refcnt not
initialized to 1.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/iscsi.c