Browse Source

Fix mutex memory leak in ph7_vm_release()

pull/8/head
Rafal Kupiec 3 years ago
parent
commit
404a2cb402
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      api.c

+ 2
- 0
api.c View File

@ -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 */


Loading…
Cancel
Save