diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-01-11 11:25:00 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-01-14 12:07:54 -0600 |
commit | 32c16620dda8ba16f6d6bcd20efefdec8975af77 (patch) | |
tree | d6a4f997b9ddd479e0b4bf936f9a9a46c4a27d3f /qga/channel-posix.c | |
parent | 03ac10f166b790cb66804e512abec6d002cd8481 (diff) | |
download | qemu-32c16620dda8ba16f6d6bcd20efefdec8975af77.zip qemu-32c16620dda8ba16f6d6bcd20efefdec8975af77.tar.gz qemu-32c16620dda8ba16f6d6bcd20efefdec8975af77.tar.bz2 |
qemu-ga: Plug fd leak on ga_channel_listen_accept() error path
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/channel-posix.c')
-rw-r--r-- | qga/channel-posix.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |