]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix memory allocation issue in threadstorage.
authorJoshua Colp <jcolp@digium.com>
Tue, 16 Oct 2007 14:19:39 +0000 (14:19 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 16 Oct 2007 14:19:39 +0000 (14:19 +0000)
(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

main/threadstorage.c

index b4d38c045a11efb981ebcbdfc25a2069503feb5b..b43568e0807ebc1f894a9f7a50e1388aaff6de68 100644 (file)
@@ -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;