From 404a2cb4022faa3d68b53519778715647c220307 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Thu, 12 Jul 2018 13:43:21 +0200 Subject: [PATCH] Fix mutex memory leak in ph7_vm_release() --- api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api.c b/api.c index f6d96ce..7b91a46 100644 --- a/api.c +++ b/api.c @@ -971,6 +971,8 @@ int ph7_vm_release(ph7_vm *pVm) #if defined(PH7_ENABLE_THREADS) /* Leave VM mutex */ SyMutexLeave(sMPGlobal.pMutexMethods,pVm->pMutex); /* NO-OP if sMPGlobal.nThreadingLevel != PH7_THREAD_LEVEL_MULTI */ + /* free VM mutex */ + SyMutexRelease(sMPGlobal.pMutexMethods,pVm->pMutex); #endif if( rc == PH7_OK ){ /* Unlink from the list of active VM */