]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virnetsocket: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Fri, 22 Aug 2014 15:01:04 +0000 (11:01 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 22 Aug 2014 17:02:48 +0000 (13:02 -0400)
commitcc1bbbbebae3c13669a3446db0b539b7038098ff
treeaeb0ba39b20bfa5d5d0980b2f18ca660ebe58119
parente1d0471e587567647aae3ec7d81e12e88badd809
virnetsocket: Resolve Coverity RESOURCE_LEAK

Since '1b807f92d' - Coverity complains that in the error paths of
both virFork() and virProcessWait() that the 'passfd' will not be closed.
Added the VIR_FORCE_CLOSE(passfd) and initialized it to -1.

Also noted that variable 'buf' was never really used - so I removed it
src/rpc/virnetsocket.c