summaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-01-15 16:16:25 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-01-15 18:58:02 +0100
commitfefd749ce29837d399a38d6052ca9968fa7352e7 (patch)
tree2c4470c8995aac4b747299d751255639138c0a48 /qemu-char.c
parentd0d7708ba29cbcc343364a46bff981e0ff88366f (diff)
downloadqemu-fefd749ce29837d399a38d6052ca9968fa7352e7.tar.gz
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: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 11caa5648d..e133f4fc35 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -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);
}