[asterisk-commits] russell: branch 1.6.2 r209906 - in /branches/1.6.2: ./ main/db1-ast/mpool/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Aug 1 06:33:52 CDT 2009


Author: russell
Date: Sat Aug  1 06:33:48 2009
New Revision: 209906

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

................
  r209887 | russell | 2009-08-01 06:29:25 -0500 (Sat, 01 Aug 2009) | 12 lines
  
  Merged revisions 209879 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r209879 | russell | 2009-08-01 06:27:25 -0500 (Sat, 01 Aug 2009) | 5 lines
    
    Resolve a valgrind warning about a read from uninitialized memory.
    
    (issue #15396)
    Reported by: aragon
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/db1-ast/mpool/mpool.c

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

Modified: branches/1.6.2/main/db1-ast/mpool/mpool.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/main/db1-ast/mpool/mpool.c?view=diff&rev=209906&r1=209905&r2=209906
==============================================================================
--- branches/1.6.2/main/db1-ast/mpool/mpool.c (original)
+++ branches/1.6.2/main/db1-ast/mpool/mpool.c Sat Aug  1 06:33:48 2009
@@ -31,6 +31,8 @@
  * SUCH DAMAGE.
  */
 
+#include "asterisk.h"
+
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)mpool.c	8.5 (Berkeley) 7/26/94";
 #endif /* LIBC_SCCS and not lint */
@@ -46,6 +48,8 @@
 #include <unistd.h>
 
 #include "../include/db.h"
+
+#include "asterisk/utils.h"
 
 #define	__MPOOLINTERFACE_PRIVATE
 #include <mpool.h>
@@ -380,7 +384,7 @@
 			return (bp);
 		}
 
-new:	if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL)
+new:	if ((bp = (BKT *) ast_calloc(1, sizeof(BKT) + mp->pagesize)) == NULL)
 		return (NULL);
 #ifdef STATISTICS
 	++mp->pagealloc;




More information about the asterisk-commits mailing list