aboutsummaryrefslogtreecommitdiff
path: root/block/qcow.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2011-08-11 16:27:15 -0500
committerKevin Wolf <kwolf@redhat.com>2011-08-23 14:15:17 +0200
commitde33b1f3ddef8d6b4d53dbd4ae049262de2d3f02 (patch)
tree77059b5a7e450b7eb59d62eb2e3ae9f00c7d08b7 /block/qcow.c
parentd57237f29127c8c488453e327221c7b3dcdbfd01 (diff)
qcow: initialize coroutine mutex
commit 52b8eb60132b27ad53476490e9d7579003390cfa added a mutex, but never initialized it. This caused a segfault. Reported-by: Alexander Graf <agraf@suse.de> Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow.c')
-rw-r--r--block/qcow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qcow.c b/block/qcow.c
index e155d3c002..8f2bdfda51 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -159,6 +159,8 @@ static int qcow_open(BlockDriverState *bs, int flags)
goto fail;
bs->backing_file[len] = '\0';
}
+
+ qemu_co_mutex_init(&s->lock);
return 0;
fail: