diff --git a/qemu-char.c b/qemu-char.c index f6bdf2fae4..cbd6b9a025 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -94,6 +94,7 @@ static QTAILQ_HEAD(CharDriverStateHead, CharDriverState) chardevs = CharDriverState *qemu_chr_alloc(void) { CharDriverState *chr = g_malloc0(sizeof(CharDriverState)); + qemu_mutex_init(&chr->chr_write_lock); return chr; }