libvirt/src/rpc
Eric Blake 0a8a79af53 rpc: avoid freeing uninitialized variable
Detected by Coverity.  Both are instances of bad things happening
if pipe2 fails; the virNetClientNew failure could free garbage,
and virNetSocketNewConnectCommand could close random fds.

Note: POSIX doesn't guarantee the contents of fd[0] and fd[1]
after pipe failure: http://austingroupbugs.net/view.php?id=467
We may need to introduce a virPipe2 wrapper that guarantees
that on pipe failure, the fds are explicitly set to -1, rather
than our current state of assuming the fds are unchanged from
their value prior to the failed pipe call.

* src/rpc/virnetclient.c (virNetClientNew): Initialize variable.
* src/rpc/virnetsocket.c (virNetSocketNewConnectCommand):
Likewise.
2011-06-30 11:36:52 -06:00
..
gendispatch.pl Convert libvirtd over to the new RPC handling APIs 2011-06-28 17:33:19 +01:00
genprotocol.pl Move the RPC generator scripts into src/rpc 2011-06-24 11:48:49 +01:00
virnetclient.c rpc: avoid freeing uninitialized variable 2011-06-30 11:36:52 -06:00
virnetclient.h Introduce generic RPC client objects 2011-06-24 11:48:45 +01:00
virnetclientprogram.c Introduce generic RPC client objects 2011-06-24 11:48:45 +01:00
virnetclientprogram.h Introduce generic RPC client objects 2011-06-24 11:48:45 +01:00
virnetclientstream.c Ensure that EOF is dispatched to the stream callback 2011-06-29 11:08:59 +01:00
virnetclientstream.h Introduce generic RPC client objects 2011-06-24 11:48:45 +01:00
virnetmessage.c Improve two log messages in virNetMessage 2011-06-29 11:08:59 +01:00
virnetmessage.h Ensure empty payload is written upon stream completion 2011-06-29 11:08:59 +01:00
virnetprotocol.x Defines the basics of a generic RPC protocol in XDR 2011-06-24 11:48:10 +01:00
virnetsaslcontext.c Generic module for handling SASL authentication & encryption 2011-06-24 11:48:25 +01:00
virnetsaslcontext.h Generic module for handling SASL authentication & encryption 2011-06-24 11:48:25 +01:00
virnetserver.c Fix leak of mdnsGroupName in virNetServer object 2011-06-30 18:04:01 +01:00
virnetserver.h Introduce generic RPC module for advertising via MDNS 2011-06-24 11:48:41 +01:00
virnetserverclient.c Ensure RPC message is cleared before being reused 2011-06-30 18:04:01 +01:00
virnetserverclient.h Fix hardcoded limit on client requests in RPC code 2011-06-30 18:04:01 +01:00
virnetservermdns.c Introduce generic RPC module for advertising via MDNS 2011-06-24 11:48:41 +01:00
virnetservermdns.h Introduce generic RPC module for advertising via MDNS 2011-06-24 11:48:41 +01:00
virnetserverprogram.c Send back an error if we get unexpected stream control message 2011-06-30 18:04:02 +01:00
virnetserverprogram.h Introduce generic RPC server objects 2011-06-24 11:48:37 +01:00
virnetserverservice.c Fix hardcoded limit on client requests in RPC code 2011-06-30 18:04:01 +01:00
virnetserverservice.h Fix hardcoded limit on client requests in RPC code 2011-06-30 18:04:01 +01:00
virnetsocket.c rpc: avoid freeing uninitialized variable 2011-06-30 11:36:52 -06:00
virnetsocket.h Introduce generic RPC module for advertising via MDNS 2011-06-24 11:48:41 +01:00
virnettlscontext.c Generic module for handling TLS encryption and x509 certs 2011-06-24 11:48:22 +01:00
virnettlscontext.h Generic module for handling TLS encryption and x509 certs 2011-06-24 11:48:22 +01:00