Received: from eggs.gnu.org ([2001:4830:134:3::10]:57686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi0AI-0001oN-1T for qemu-devel@nongnu.org; Thu, 08 Sep 2016 10:18:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi0AG-00010C-KL for qemu-devel@nongnu.org; Thu, 08 Sep 2016 10:18:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi0AG-000107-Er for qemu-devel@nongnu.org; Thu, 08 Sep 2016 10:18:52 -0400 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 8 Sep 2016 18:17:20 +0400 Message-Id: <20160908141720.30641-26-marcandre.lureau@redhat.com> In-Reply-To: <20160908141720.30641-1-marcandre.lureau@redhat.com> References: <20160908141720.30641-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULLv2 25/25] tests: fix postcopy-test leaks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, eblake@redhat.com, armbru@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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.10.0