From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSmUL-0001XK-F1 for qemu-devel@nongnu.org; Thu, 28 Jul 2016 10:40:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSmUJ-0001EY-Bm for qemu-devel@nongnu.org; Thu, 28 Jul 2016 10:40:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSmUJ-0001ES-0Y for qemu-devel@nongnu.org; Thu, 28 Jul 2016 10:40:39 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7BA62445EC for ; Thu, 28 Jul 2016 14:40:38 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Thu, 28 Jul 2016 18:38:08 +0400 Message-Id: <20160728143808.13707-38-marcandre.lureau@redhat.com> In-Reply-To: <20160728143808.13707-1-marcandre.lureau@redhat.com> References: <20160728143808.13707-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 37/37] tests: fix postcopy-test leaks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau A few strings are allocated and never freed. Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/postcopy-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c index f6f6598..9b32c5e 100644 --- a/tests/postcopy-test.c +++ b/tests/postcopy-test.c @@ -132,6 +132,7 @@ static void wait_for_serial(const char *side) char *serialpath =3D g_strdup_printf("%s/%s", tmpfs, side); FILE *serialfile =3D fopen(serialpath, "r"); =20 + g_free(serialpath); do { int readvalue =3D fgetc(serialfile); =20 @@ -143,7 +144,6 @@ static void wait_for_serial(const char *side) case 'B': /* It's alive! */ fclose(serialfile); - g_free(serialpath); return; =20 case EOF: @@ -288,6 +288,7 @@ static void cleanup(const char *filename) char *path =3D g_strdup_printf("%s/%s", tmpfs, filename); =20 unlink(path); + g_free(path); } =20 static void test_migrate(void) @@ -319,6 +320,7 @@ static void test_migrate(void) " -drive file=3D%s,format=3Draw" " -incoming %s", tmpfs, bootpath, uri); + g_free(bootpath); to =3D qtest_init(cmd); g_free(cmd); =20 --=20 2.9.0