Received: from eggs.gnu.org ([2001:4830:134:3::10]:39697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUxcA-0001Ag-L2 for qemu-devel@nongnu.org; Wed, 03 Aug 2016 10:57:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUxc8-0001wY-SV for qemu-devel@nongnu.org; Wed, 03 Aug 2016 10:57:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUxc8-0001wU-Me for qemu-devel@nongnu.org; Wed, 03 Aug 2016 10:57:44 -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 3B17C3B709 for ; Wed, 3 Aug 2016 14:57:44 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Wed, 3 Aug 2016 18:55:41 +0400 Message-Id: <20160803145541.15355-37-marcandre.lureau@redhat.com> In-Reply-To: <20160803145541.15355-1-marcandre.lureau@redhat.com> References: <20160803145541.15355-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 for-2.7 v3 36/36] tests: fix postcopy-test leaks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, 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 Reviewed-by: Eric Blake --- tests/postcopy-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c index bf4e579..41ed1a9 100644 --- a/tests/postcopy-test.c +++ b/tests/postcopy-test.c @@ -176,6 +176,7 @@ static void wait_for_serial(const char *side) int started =3D (strcmp(side, "src_serial") =3D=3D 0 && strcmp(arch, "ppc64") =3D=3D 0) ? 0 : 1; =20 + g_free(serialpath); do { int readvalue =3D fgetc(serialfile); =20 @@ -203,7 +204,6 @@ static void wait_for_serial(const char *side) case 'B': /* It's alive! */ fclose(serialfile); - g_free(serialpath); return; =20 case EOF: @@ -350,6 +350,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) @@ -394,6 +395,8 @@ static void test_migrate(void) g_assert_not_reached(); } =20 + g_free(bootpath); + from =3D qtest_start(cmd_src); g_free(cmd_src); =20 --=20 2.9.0