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>
This commit is contained in:
parent
d0d7708ba2
commit
fefd749ce2
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user