Merged revisions 339089 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339089 | may | 2011-10-03 22:52:55 +0400 (Mon, 03 Oct 2011) | 10 lines
  
  Merged revisions 339087 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339087 | may | 2011-10-03 22:42:49 +0400 (Mon, 03 Oct 2011) | 4 lines
    
    destroy memheap mutex properly before memheap deleted
    (fix memory leak occured after r304950 changes with DEBUG_THREAD compile option)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Alexandr Anikin 2011-10-03 19:16:19 +00:00
parent 2644af39b4
commit 4f01bb5e50
1 changed files with 3 additions and 2 deletions

View File

@ -1078,9 +1078,10 @@ void memHeapRelease (void** ppvMemHeap)
free (pMemLink2);
}
if ((*ppMemHeap)->flags & RT_MH_FREEHEAPDESC)
if ((*ppMemHeap)->flags & RT_MH_FREEHEAPDESC) {
ast_mutex_destroy(&pMemHeap->pLock);
free (*ppMemHeap);
}
*ppMemHeap = 0;
}
}