mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Merged revisions 164736 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r164736 | russell | 2008-12-16 11:06:29 -0600 (Tue, 16 Dec 2008) | 14 lines Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS. One issue was that the ast_mutex_* API was being used within the context of the thread local data destructors. We would go off and allocate more thread local data while the pthread lib was in the middle of destroying it all. This led to a memory leak. Another issue was an invalid argument being provided to the the object_add API call. (closes issue #13678) Reported by: ys Tested by: Russell ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -204,7 +204,7 @@ void *__ast_threadstorage_get(struct ast_threadstorage *ts, size_t init_size, co
|
||||
return NULL;
|
||||
}
|
||||
pthread_setspecific(ts->key, buf);
|
||||
__ast_threadstorage_object_add(&ts->key, init_size, file, function, line);
|
||||
__ast_threadstorage_object_add(buf, init_size, file, function, line);
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
Reference in New Issue
Block a user