From: Joshua Colp Date: Tue, 16 Oct 2007 14:19:39 +0000 (+0000) Subject: Fix memory allocation issue in threadstorage. X-Git-Tag: 1.4.14~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a935a35a09eaea72d7a4c1e4a5e5c24f69a4d98;p=thirdparty%2Fasterisk.git Fix memory allocation issue in threadstorage. (closes issue #10995) Reported by: snuffy Patches: new-patch.diff uploaded by snuffy (license 35) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85818 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/threadstorage.c b/main/threadstorage.c index b4d38c045a..b43568e080 100644 --- a/main/threadstorage.c +++ b/main/threadstorage.c @@ -56,7 +56,7 @@ void __ast_threadstorage_object_add(void *key, size_t len, const char *file, con { struct tls_object *to; - if (!(to = ast_calloc(sizeof(*to), 1))) + if (!(to = ast_calloc(1, sizeof(*to)))) return; to->key = key;