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.
This commit is contained in:
Eric Blake 2011-08-02 09:50:54 -06:00
parent d68b97c8a6
commit 50ae1de27c

View File

@ -471,7 +471,7 @@ cleanup:
static int virNetServerSignalSetup(virNetServerPtr srv)
{
int fds[2];
int fds[2] = { -1, -1 };
if (srv->sigwrite != -1)
return 0;