Mon Dec 15 09:16:20 CST 2008 Pekka Pessi <first.last@nokia.com>
* su_alloc.c: always unlock home before destroying mutexes git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11765 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c536aac576
commit
91dc5d5f54
|
@ -842,6 +842,8 @@ void su_free(su_home_t *home, void *data)
|
|||
*
|
||||
* @param home pointer to a memory home
|
||||
* @param data pointer to a memory area possibly allocated though home
|
||||
*
|
||||
* @NEW_1_12_9
|
||||
*/
|
||||
int su_home_check_alloc(su_home_t const *home, void const *data)
|
||||
{
|
||||
|
@ -1020,13 +1022,13 @@ void _su_home_deinit(su_home_t *home)
|
|||
home->suh_blocks = NULL;
|
||||
|
||||
if (home->suh_lock) {
|
||||
void *suh_lock = home->suh_lock;
|
||||
void *suh_lock = home->suh_lock;
|
||||
|
||||
home->suh_lock = NULL;
|
||||
home->suh_lock = NULL;
|
||||
|
||||
/* Unlock, or risk assert() or leak handles on Windows */
|
||||
_su_home_unlocker(suh_lock);
|
||||
_su_home_destroy_mutexes(suh_lock);
|
||||
/* Unlock, or risk assert() or leak handles on Windows */
|
||||
_su_home_unlocker(suh_lock);
|
||||
_su_home_destroy_mutexes(suh_lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue