summaryrefslogtreecommitdiff
path: root/main/lock.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2011-02-09 05:53:29 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2011-02-09 05:53:29 +0000
commitfc4df44bd8269dcb4544fc104c25f452fa176d7c (patch)
tree1f266f6dd1082c6dfa295587d5d805c92cfd2f12 /main/lock.c
parentf01e9568d2f9e67022e5de54f30e45eb9d9bda26 (diff)
Merged revisions 307142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r307142 | tilghman | 2011-02-08 23:39:39 -0600 (Tue, 08 Feb 2011) | 3 lines Initialize tracking variable in structure properly. Fixes a memory leak. (Reported by The_Boy_Wonder on IRC, fixed by me.) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/lock.c')
-rw-r--r--main/lock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/lock.c b/main/lock.c
index 04438086e..33e3345f1 100644
--- a/main/lock.c
+++ b/main/lock.c
@@ -61,7 +61,9 @@ int __ast_pthread_mutex_init(int tracking, const char *filename, int lineno, con
#endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
- ast_reentrancy_init(&t->track);
+ if ((t->tracking = tracking)) {
+ ast_reentrancy_init(&t->track);
+ }
#endif /* DEBUG_THREADS */
pthread_mutexattr_init(&attr);