mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
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:
parent
d68b97c8a6
commit
50ae1de27c
@ -471,7 +471,7 @@ cleanup:
|
||||
|
||||
static int virNetServerSignalSetup(virNetServerPtr srv)
|
||||
{
|
||||
int fds[2];
|
||||
int fds[2] = { -1, -1 };
|
||||
|
||||
if (srv->sigwrite != -1)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user