提交 50ae1de2 编写于 作者: E Eric Blake

rpc: avoid double close on error

Spotted by coverity.  If pipe2 fails, then we attempt to close
uninitialized fds, which may result in a double-close.

* src/rpc/virnetserver.c (virNetServerSignalSetup): Initialize fds.
上级 d68b97c8
......@@ -471,7 +471,7 @@ cleanup:
static int virNetServerSignalSetup(virNetServerPtr srv)
{
int fds[2];
int fds[2] = { -1, -1 };
if (srv->sigwrite != -1)
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册