[asterisk-commits] may: branch 1.8 r339087 - /branches/1.8/addons/ooh323c/src/memheap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 3 13:42:53 CDT 2011


Author: may
Date: Mon Oct  3 13:42:49 2011
New Revision: 339087

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=339087
Log:
destroy memheap mutex properly before memheap deleted
(fix memory leak occured after r304950 changes with DEBUG_THREAD compile option)


Modified:
    branches/1.8/addons/ooh323c/src/memheap.c

Modified: branches/1.8/addons/ooh323c/src/memheap.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/memheap.c?view=diff&rev=339087&r1=339086&r2=339087
==============================================================================
--- branches/1.8/addons/ooh323c/src/memheap.c (original)
+++ branches/1.8/addons/ooh323c/src/memheap.c Mon Oct  3 13:42:49 2011
@@ -1078,9 +1078,10 @@
          free (pMemLink2);
       }
 
-      if ((*ppMemHeap)->flags & RT_MH_FREEHEAPDESC)
+      if ((*ppMemHeap)->flags & RT_MH_FREEHEAPDESC) {
+         ast_mutex_destroy(&pMemHeap->pLock);
          free (*ppMemHeap);
-
+      }
       *ppMemHeap = 0;
    }
 }




More information about the asterisk-commits mailing list