summaryrefslogtreecommitdiffstats
path: root/qemu-char.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-01-15 16:16:25 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:24 -0600
commit935ec06436604035627cb4114a68f40a50d5762f (patch)
tree233220d8f4fcfdb365b49600fac8335ea9991c3d /qemu-char.c
parent52e14ca0fd642507112617774e6bcb3d53ad83d2 (diff)
downloadhqemu-935ec06436604035627cb4114a68f40a50d5762f.zip
hqemu-935ec06436604035627cb4114a68f40a50d5762f.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 11caa56..e133f4f 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);
}
OpenPOWER on IntegriCloud