]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: identity: Harden virIdentitySetCurrent()
authorPeter Krempa <pkrempa@redhat.com>
Wed, 25 Mar 2015 07:25:45 +0000 (08:25 +0100)
committerCole Robinson <crobinso@redhat.com>
Mon, 27 Apr 2015 23:54:49 +0000 (19:54 -0400)
commit5081142ed86123902fb54191c61dc6b11acc94b7
tree8be4b4ac5d4b56138a84b2828d9b2ccafa3a0bbf
parentdc7c0de5875be43cdc702d524310fa5b42d538fc
util: identity: Harden virIdentitySetCurrent()

Don't unref the old identity unless we set the new one correctly and
unref the new one on failure to set it so that we don't leak any
references or use invalid pointers.

(cherry picked from commit ad886fa6c8ebc321a0386a75c187d315111cf1f3)
src/util/viridentity.c