提交 32c16620 编写于 作者: M Markus Armbruster 提交者: Michael Roth

qemu-ga: Plug fd leak on ga_channel_listen_accept() error path

Spotted by Coverity.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 03ac10f1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册