[asterisk-commits] kharwell: branch 11 r388839 - in /branches/11: ./ main/lock.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 15 10:57:26 CDT 2013


Author: kharwell
Date: Wed May 15 10:57:25 2013
New Revision: 388839

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388839
Log:
Fix for segfault in __ast_rwlock_destroy with DEBUG_THREADS

If DEBUG_THREADS is enabled __ast_rwlock_destroy causes a segfault while trying
to access a possible NULL t->track object.  A NULL check has been added before
trying to access the memory.

(closes issue ASTERISK-21724)
Reported by: Corey Farrell
Fixed by: Corey Farrell
Patches:
	ast_rwlock_destroy-segv.patch uploaded by Corey Farrell (license 5909)
........

Merged revisions 388838 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/main/lock.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/main/lock.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/lock.c?view=diff&rev=388839&r1=388838&r2=388839
==============================================================================
--- branches/11/main/lock.c (original)
+++ branches/11/main/lock.c Wed May 15 10:57:25 2013
@@ -745,7 +745,7 @@
 		__ast_mutex_logger("%s line %d (%s): Error destroying rwlock %s: %s\n",
 				filename, lineno, func, rwlock_name, strerror(res));
 	}
-	if (t->tracking) {
+	if (t->tracking && lt) {
 		ast_reentrancy_lock(lt);
 		lt->file[0] = filename;
 		lt->lineno[0] = lineno;




More information about the asterisk-commits mailing list