summaryrefslogtreecommitdiff
path: root/include/asterisk/threadstorage.h
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-12-16 17:14:01 +0000
committerRussell Bryant <russell@russellbryant.com>2008-12-16 17:14:01 +0000
commit556b08252289bdabef3930b492ee013a4c317c83 (patch)
treedcb6a2481818394e37619343066de2a1bbcef8ff /include/asterisk/threadstorage.h
parent601176cb6ebd7f713a4548ba60c4644585cdb415 (diff)
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
Diffstat (limited to 'include/asterisk/threadstorage.h')
-rw-r--r--include/asterisk/threadstorage.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asterisk/threadstorage.h b/include/asterisk/threadstorage.h
index ab586974f..13b1e007c 100644
--- a/include/asterisk/threadstorage.h
+++ b/include/asterisk/threadstorage.h
@@ -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;