提交 91dc5d5f authored 作者: Michael Jerris's avatar Michael Jerris

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
上级 c536aac5
...@@ -842,6 +842,8 @@ void su_free(su_home_t *home, void *data) ...@@ -842,6 +842,8 @@ void su_free(su_home_t *home, void *data)
* *
* @param home pointer to a memory home * @param home pointer to a memory home
* @param data pointer to a memory area possibly allocated though 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) 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) ...@@ -1020,13 +1022,13 @@ void _su_home_deinit(su_home_t *home)
home->suh_blocks = NULL; home->suh_blocks = NULL;
if (home->suh_lock) { 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 */ /* Unlock, or risk assert() or leak handles on Windows */
_su_home_unlocker(suh_lock); _su_home_unlocker(suh_lock);
_su_home_destroy_mutexes(suh_lock); _su_home_destroy_mutexes(suh_lock);
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论