From patchwork Fri Jan 11 10:25:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4/6] qemu-ga: Plug fd leak on ga_channel_listen_accept() error path Date: Fri, 11 Jan 2013 00:25:00 -0000 From: Markus Armbruster X-Patchwork-Id: 211291 Message-Id: <1357899902-5316-5-git-send-email-armbru@redhat.com> To: qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-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 d4fd628..5579185 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -45,6 +45,7 @@ static gboolean ga_channel_listen_accept(GIOChannel *channel, ret = ga_channel_client_add(c, client_fd); if (ret) { g_warning("error setting up connection"); + close(client_fd); goto out; } accepted = true;