All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] qemu-char: do not leak QemuMutex when freeing a character device
Date: Fri, 15 Jan 2016 16:17:01 +0100	[thread overview]
Message-ID: <1452871021-32405-1-git-send-email-pbonzini@redhat.com> (raw)

The leak is only apparent on Win32.  On POSIX platforms destroying a
mutex is not necessary.

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qemu-char.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qemu-char.c b/qemu-char.c
index 02b0318..c7b8699 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3967,6 +3967,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);
 }
 
-- 
2.5.0

             reply	other threads:[~2016-01-15 15:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 15:17 Paolo Bonzini [this message]
2016-01-15 15:20 ` [Qemu-devel] [PATCH] qemu-char: do not leak QemuMutex when freeing a character device Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452871021-32405-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.