]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: virIdentitySetCurrent: only unref the old identity on success
authorJán Tomko <jtomko@redhat.com>
Fri, 3 Sep 2021 14:04:44 +0000 (16:04 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 8 Sep 2021 14:19:55 +0000 (16:19 +0200)
commita082c462290bfa8fd4cbbc41c1d6040864228c78
treec7629569ac63e3a534f737e30148fdbf8dfd8672
parent09b08e9a80ab45418f422579fabc50fd425ef96a
util: virIdentitySetCurrent: only unref the old identity on success

In the unlikely case that we were unable to set the new
identity, we would unref the old one even though it still
could be in the thread-local storage.

Fixes: c6825d88137cb8e4debdf4310e45ee23cb5698c0
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/viridentity.c