[asterisk-commits] tilghman: branch 1.8 r307142 - /branches/1.8/main/lock.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 8 23:39:43 CST 2011
Author: tilghman
Date: Tue Feb 8 23:39:39 2011
New Revision: 307142
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=307142
Log:
Initialize tracking variable in structure properly. Fixes a memory leak.
(Reported by The_Boy_Wonder on IRC, fixed by me.)
Modified:
branches/1.8/main/lock.c
Modified: branches/1.8/main/lock.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/lock.c?view=diff&rev=307142&r1=307141&r2=307142
==============================================================================
--- branches/1.8/main/lock.c (original)
+++ branches/1.8/main/lock.c Tue Feb 8 23:39:39 2011
@@ -61,7 +61,9 @@
#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);
More information about the asterisk-commits
mailing list