]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNetworkObjFindBy*: Return an reference to found object
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Feb 2015 12:45:05 +0000 (13:45 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Mar 2015 15:58:49 +0000 (16:58 +0100)
commit68818dcdd5c1165f06feb42cd7f4119fcbf87375
tree5a40e2576f7c02526fab761317feb820fe09fd87
parent53881c70bcf4376121996de4e138d2672554c1a9
virNetworkObjFindBy*: Return an reference to found object

This patch turns both virNetworkObjFindByUUID() and
virNetworkObjFindByName() to return an referenced object so that
even if caller unlocks it, it's for sure that object won't
disappear meanwhile. Especially if the object (in general) is
locked and unlocked during the caller run.
Moreover, this commit is nicely small, since the object unrefing
can be done in virNetworkObjEndAPI().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/network_conf.c
src/network/bridge_driver.c
src/test/test_driver.c