qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PULL 5/7] vhost-user-test: fix leaks
Date: Fri,  8 Mar 2019 10:18:41 +0100	[thread overview]
Message-ID: <1552036723-1949-6-git-send-email-thuth@redhat.com> (raw)
In-Reply-To: <1552036723-1949-1-git-send-email-thuth@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Spotted by ASAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Fixes: ae31fb54914 and 4d3f50eb489
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/vhost-user-test.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 83ea15f..14a1e2f 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -588,6 +588,7 @@ static void test_server_free(TestServer *server)
         g_test_message("unable to rmdir: path (%s): %s",
                        server->tmpfs, strerror(errno));
     }
+    g_free(server->tmpfs);
 
     qemu_chr_fe_deinit(&server->chr, true);
 
@@ -605,6 +606,8 @@ static void test_server_free(TestServer *server)
 
     g_main_loop_unref(server->loop);
     g_main_context_unref(server->context);
+    g_cond_clear(&server->data_cond);
+    g_mutex_clear(&server->data_mutex);
     g_free(server);
 }
 
-- 
1.8.3.1

  parent reply	other threads:[~2019-03-08  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08  9:18 [Qemu-devel] [PULL 0/7] qtests, clean-ups and macOS CI testing Thomas Huth
2019-03-08  9:18 ` [Qemu-devel] [PULL 1/7] tests: Move qdict-test-data.txt to tests/data/qobject/ Thomas Huth
2019-03-08  9:18 ` [Qemu-devel] [PULL 2/7] hw: Remove unused 'hw/devices.h' include Thomas Huth
2019-03-08  9:18 ` [Qemu-devel] [PULL 3/7] hw/devices: Remove unused TC6393XB_RAM definition Thomas Huth
2019-03-08  9:18 ` [Qemu-devel] [PULL 4/7] tests: Do not use "\n" in g_test_message() strings Thomas Huth
2019-03-08  9:18 ` Thomas Huth [this message]
2019-03-08  9:18 ` [Qemu-devel] [PULL 6/7] tests/bios-tables: Improve portability by searching bash in the $PATH Thomas Huth
2019-03-08  9:18 ` [Qemu-devel] [PULL 7/7] cirrus.yml: Add macOS continuous integration task Thomas Huth
2019-03-08 18:29 ` [Qemu-devel] [PULL 0/7] qtests, clean-ups and macOS CI testing Peter Maydell

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=1552036723-1949-6-git-send-email-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).