From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQo4-0000aD-NX for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPQo3-0007cu-Ot for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:55:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQo3-0007co-JA for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:55:11 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 2050B46201 for ; Tue, 19 Jul 2016 08:55:11 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Tue, 19 Jul 2016 12:54:06 +0400 Message-Id: <20160719085432.4572-12-marcandre.lureau@redhat.com> In-Reply-To: <20160719085432.4572-1-marcandre.lureau@redhat.com> References: <20160719085432.4572-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 11/37] tests: fix small leak in test-io-channel-command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau srcfifo && dstfifo must still be freed in this case. Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/test-io-channel-command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-io-channel-command.c b/tests/test-io-channel-comm= and.c index 1d1f461..95be370 100644 --- a/tests/test-io-channel-command.c +++ b/tests/test-io-channel-command.c @@ -40,7 +40,7 @@ static void test_io_channel_command_fifo(bool async) =20 unlink(TEST_FIFO); if (access("/bin/socat", X_OK) < 0) { - return; /* Pretend success if socat is not present */ + goto end; /* Pretend success if socat is not present */ } if (mkfifo(TEST_FIFO, 0600) < 0) { abort(); @@ -59,6 +59,7 @@ static void test_io_channel_command_fifo(bool async) object_unref(OBJECT(src)); object_unref(OBJECT(dst)); =20 +end: g_free(srcfifo); g_free(dstfifo); unlink(TEST_FIFO); --=20 2.9.0