From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuqCp-0001Wf-Kl for qemu-devel@nongnu.org; Mon, 14 Jan 2013 15:00:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuqCo-0008R4-BA for qemu-devel@nongnu.org; Mon, 14 Jan 2013 15:00:27 -0500 Received: from mail-ie0-f175.google.com ([209.85.223.175]:42965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuqCo-0008Qq-6W for qemu-devel@nongnu.org; Mon, 14 Jan 2013 15:00:26 -0500 Received: by mail-ie0-f175.google.com with SMTP id qd14so5747853ieb.34 for ; Mon, 14 Jan 2013 12:00:25 -0800 (PST) Sender: fluxion From: Michael Roth Date: Mon, 14 Jan 2013 13:55:11 -0600 Message-Id: <1358193312-15960-8-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1358193312-15960-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1358193312-15960-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 7/8] qemu-ga: Plug fd leak on ga_channel_open() error paths List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, armbru@redhat.com, lcapitulino@redhat.com From: Markus Armbruster Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth Reviewed-by: Luiz Capitulino Signed-off-by: Michael Roth --- qga/channel-posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qga/channel-posix.c b/qga/channel-posix.c index 9a5c05d..05e8386 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -154,6 +154,7 @@ static gboolean ga_channel_open(GAChannel *c, const gchar *path, GAChannelMethod ret = ga_channel_client_add(c, fd); if (ret) { g_critical("error adding channel to main loop"); + close(fd); return false; } break; -- 1.7.9.5