mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
03ac10f166
commit
32c16620dd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue