From 32c16620dda8ba16f6d6bcd20efefdec8975af77 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 11 Jan 2013 11:25:00 +0100 Subject: qemu-ga: Plug fd leak on ga_channel_listen_accept() error path 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(+) (limited to 'qga/channel-posix.c') diff --git a/qga/channel-posix.c b/qga/channel-posix.c index ca9e4aa..9a5c05d 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -46,6 +46,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; -- cgit v1.1