[svn-commits] mmichelson: branch 1.6.0 r203232 - in /branches/1.6.0: ./ main/astmm.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 25 13:54:19 CDT 2009


Author: mmichelson
Date: Thu Jun 25 13:54:15 2009
New Revision: 203232

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203232
Log:
Merged revisions 203231 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r203231 | mmichelson | 2009-06-25 13:53:12 -0500 (Thu, 25 Jun 2009) | 8 lines
  
  Blocked revisions 203230 via svnmerge
  
  ........
    r203230 | mmichelson | 2009-06-25 13:52:22 -0500 (Thu, 25 Jun 2009) | 3 lines
    
    Prevent false positives when freeing a NULL pointer with MALLOC_DEBUG enabled.
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/astmm.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/astmm.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/main/astmm.c?view=diff&rev=203232&r1=203231&r2=203232
==============================================================================
--- branches/1.6.0/main/astmm.c (original)
+++ branches/1.6.0/main/astmm.c Thu Jun 25 13:54:15 2009
@@ -156,9 +156,15 @@
 
 static void __ast_free_region(void *ptr, const char *file, int lineno, const char *func)
 {
-	int hash = HASH(ptr);
+	int hash;
 	struct ast_region *reg, *prev = NULL;
 	unsigned int *fence;
+
+	if (!ptr) {
+		return;
+	}
+
+	hash = HASH(ptr);
 
 	ast_mutex_lock(&reglock);
 	for (reg = regions[hash]; reg; reg = reg->next) {




More information about the svn-commits mailing list