From: "Daniel P. Berrange" <berrange(a)redhat.com>
The virNetTLSContextRef API forgot to acquire/release the lock
while changing ctxt->refs
* src/rpc/virnettlscontext.c: Add lock calls
---
src/rpc/virnettlscontext.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
index 58accaf..f3cc769 100644
--- a/src/rpc/virnettlscontext.c
+++ b/src/rpc/virnettlscontext.c
@@ -931,7 +931,9 @@ virNetTLSContextPtr virNetTLSContextNewClient(const char *cacert,
void virNetTLSContextRef(virNetTLSContextPtr ctxt)
{
+ virMutexLock(&ctxt->lock);
ctxt->refs++;
+ virMutexUnlock(&ctxt->lock);
}
--
1.7.6.4