提交 fefd749c 编写于 作者: P Paolo Bonzini

qemu-char: do not leak QemuMutex when freeing a character device

The leak is only apparent on Win32.  On POSIX platforms destroying a
mutex is not necessary.
Reported-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 d0d7708b
......@@ -3972,6 +3972,7 @@ static void qemu_chr_free_common(CharDriverState *chr)
if (chr->logfd != -1) {
close(chr->logfd);
}
qemu_mutex_destroy(&chr->chr_write_lock);
g_free(chr);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册