mirror of https://gitee.com/openkylin/libvirt.git
Fix missing lock calls on virNetTLSContextRef
The virNetTLSContextRef API forgot to acquire/release the lock while changing ctxt->refs * src/rpc/virnettlscontext.c: Add lock calls
This commit is contained in:
parent
5bcbb3902f
commit
bc7b8c7e06
src/rpc
|
@ -931,7 +931,9 @@ virNetTLSContextPtr virNetTLSContextNewClient(const char *cacert,
|
|||
|
||||
void virNetTLSContextRef(virNetTLSContextPtr ctxt)
|
||||
{
|
||||
virMutexLock(&ctxt->lock);
|
||||
ctxt->refs++;
|
||||
virMutexUnlock(&ctxt->lock);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue