]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rpc: Actually increase reference count on @srv in virNetDaemonAddServer
authorPeter Krempa <pkrempa@redhat.com>
Thu, 18 Jun 2015 09:37:17 +0000 (11:37 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 18 Jun 2015 11:32:37 +0000 (13:32 +0200)
commit4002395dd7180158aa32adc31ab61a2f155380df
treecf1846c0e040ca9b5b8c854c025659a47fa286d6
parent0c151004bc2212ebb3d268a13291277a2b2073db
rpc: Actually increase reference count on @srv in virNetDaemonAddServer

VIR_APPEND_ELEMENT would clear @srv to NULL after it successfully
inserted it thus the reference count could not be increased afterwards.

Switch to VIR_APPEND_ELEMENT_COPY. This fixes crash after terminating
the daemon.
src/rpc/virnetdaemon.c