libvirt/src/rpc
Nikolay Shirokovskiy d051e7f703 rpc: virNetClientNew: fix socket leak on error path
if virNetClientNew finishes with error before sock is set
to client object then sock does not get unrefed. This is
unexpected by function clients like virNetClientNewUNIX.
Let's make sure sock gets unrefed on any error path.

Next some clients like virNetClientNewLibSSH2 try to unref
sock on virNetClientNew errors. This is not correct even
before this patch because in some cases virNetClientNew
unrefed sock on error path by itself. Let's give up
sock managment to virNetClientNew entirely.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-18 14:01:27 +03:00
..
gendispatch.pl remote: check & report OOM in make_nonnull_XXX methods 2018-12-13 16:57:32 +00:00
genprotocol.pl rpc: reproducible genprotocol output 2018-10-12 14:44:43 +02:00
gensystemtap.pl Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
Makefile.inc.am src: Always build virnettlscontext into libvirt-net-rpc.la 2018-06-05 14:32:26 +02:00
virkeepalive.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virkeepalive.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virkeepaliveprotocol.x
virnetclient.c rpc: virNetClientNew: fix socket leak on error path 2019-01-18 14:01:27 +03:00
virnetclient.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetclientprogram.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetclientprogram.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetclientstream.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetclientstream.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetdaemon.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetdaemon.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetlibsshsession.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetlibsshsession.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetmessage.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virnetmessage.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetprotocol.x Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetsaslcontext.c virobject: Introduce VIR_CLASS_NEW() macro 2018-04-18 10:04:55 +02:00
virnetsaslcontext.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetserver.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetserver.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetserverclient.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetserverclient.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetservermdns.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetservermdns.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetserverprogram.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetserverprogram.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetserverservice.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetserverservice.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetsocket.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetsocket.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetsshsession.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virnetsshsession.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnettlscontext.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virnettlscontext.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00