From de33b1f3ddef8d6b4d53dbd4ae049262de2d3f02 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Thu, 11 Aug 2011 16:27:15 -0500 Subject: [PATCH] qcow: initialize coroutine mutex commit 52b8eb60132b27ad53476490e9d7579003390cfa added a mutex, but never initialized it. This caused a segfault. Reported-by: Alexander Graf Signed-off-by: Scott Wood Signed-off-by: Kevin Wolf --- block/qcow.c | 2 ++ 1 file changed, 2 insertions(+) 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: