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:
Daniel P. Berrange 2011-10-07 16:42:54 +01:00
parent 5bcbb3902f
commit bc7b8c7e06

View File

@ -931,7 +931,9 @@ virNetTLSContextPtr virNetTLSContextNewClient(const char *cacert,
void virNetTLSContextRef(virNetTLSContextPtr ctxt)
{
virMutexLock(&ctxt->lock);
ctxt->refs++;
virMutexUnlock(&ctxt->lock);
}