]> xenbits.xensource.com Git - libvirt.git/commit
lxc: completely rework reference counting
authorKaterina Koukiou <k.koukiou@googlemail.com>
Fri, 20 May 2016 15:17:01 +0000 (18:17 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 May 2016 14:54:01 +0000 (16:54 +0200)
commit306b3a85041642ab29db37d736789de296ae147c
treeb781a148d24fd1b00ccdfb9fe8641c683dc392c9
parent6ce89dcae097b44752ae0c9d22bfc70504d0d15f
lxc: completely rework reference counting

This patch follows the pattern used in qemu driver regarding
reference counting.
It changes lxcDomObjFromDomain() to ref the domain (using
virDomainObjListFindByUUIDRef()) and adds virDomainObjEndAPI() which
should be the only function in which the return value of
virObjectUnref() is checked.  This makes all reference counting
deterministic and makes the code a bit clearer.

Signed-off-by: Katerina Koukiou <k.koukiou@gmail.com>
src/lxc/lxc_domain.c
src/lxc/lxc_domain.h
src/lxc/lxc_driver.c