diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-01 11:33:48 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-01 11:33:48 +0000 |
commit | 6dee6c528e4c7c1027b02f2c0e9f6446fcd47d81 (patch) | |
tree | 8d9ca5dcca752c4b87e169e2d07d589c2e618ffa /main/db1-ast | |
parent | d62fcc6da7d343c441f4fa2481b17b3df5830b4b (diff) |
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
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@209906 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/db1-ast')
-rw-r--r-- | main/db1-ast/mpool/mpool.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/db1-ast/mpool/mpool.c b/main/db1-ast/mpool/mpool.c index b5b7c86d6..719136d7b 100644 --- a/main/db1-ast/mpool/mpool.c +++ b/main/db1-ast/mpool/mpool.c @@ -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 */ @@ -47,6 +49,8 @@ static char sccsid[] = "@(#)mpool.c 8.5 (Berkeley) 7/26/94"; #include "../include/db.h" +#include "asterisk/utils.h" + #define __MPOOLINTERFACE_PRIVATE #include <mpool.h> @@ -380,7 +384,7 @@ mpool_bkt(mp) 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; |