[asterisk-commits] mmichelson: branch 1.6.1 r203233 - in /branches/1.6.1: ./ main/astmm.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 25 13:55:11 CDT 2009
Author: mmichelson
Date: Thu Jun 25 13:55:07 2009
New Revision: 203233
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203233
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.1/ (props changed)
branches/1.6.1/main/astmm.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/astmm.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/main/astmm.c?view=diff&rev=203233&r1=203232&r2=203233
==============================================================================
--- branches/1.6.1/main/astmm.c (original)
+++ branches/1.6.1/main/astmm.c Thu Jun 25 13:55:07 2009
@@ -157,9 +157,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(®lock);
for (reg = regions[hash]; reg; reg = reg->next) {
More information about the asterisk-commits
mailing list