mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Fix initialization of virIdentityPtr thread locals
Some code mistakenly called virIdentityOnceInit directly instead of virIdentityInitialize(). This meant that one-time initializer was run many times with predictably bad results.
This commit is contained in:
parent
cb86e9d39b
commit
6e5ad18992
@ -83,7 +83,7 @@ virIdentityPtr virIdentityGetCurrent(void)
|
||||
{
|
||||
virIdentityPtr ident;
|
||||
|
||||
if (virIdentityOnceInit() < 0)
|
||||
if (virIdentityInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
ident = virThreadLocalGet(&virIdentityCurrent);
|
||||
@ -104,7 +104,7 @@ int virIdentitySetCurrent(virIdentityPtr ident)
|
||||
{
|
||||
virIdentityPtr old;
|
||||
|
||||
if (virIdentityOnceInit() < 0)
|
||||
if (virIdentityInitialize() < 0)
|
||||
return -1;
|
||||
|
||||
old = virThreadLocalGet(&virIdentityCurrent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user