mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@209900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -31,6 +31,8 @@ | |||||||
|  * SUCH DAMAGE. |  * SUCH DAMAGE. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | #include "asterisk.h" | ||||||
|  |  | ||||||
| #if defined(LIBC_SCCS) && !defined(lint) | #if defined(LIBC_SCCS) && !defined(lint) | ||||||
| static char sccsid[] = "@(#)mpool.c	8.5 (Berkeley) 7/26/94"; | static char sccsid[] = "@(#)mpool.c	8.5 (Berkeley) 7/26/94"; | ||||||
| #endif /* LIBC_SCCS and not lint */ | #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 "../include/db.h" | ||||||
|  |  | ||||||
|  | #include "asterisk/utils.h" | ||||||
|  |  | ||||||
| #define	__MPOOLINTERFACE_PRIVATE | #define	__MPOOLINTERFACE_PRIVATE | ||||||
| #include <mpool.h> | #include <mpool.h> | ||||||
|  |  | ||||||
| @@ -380,7 +384,7 @@ mpool_bkt(mp) | |||||||
| 			return (bp); | 			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); | 		return (NULL); | ||||||
| #ifdef STATISTICS | #ifdef STATISTICS | ||||||
| 	++mp->pagealloc; | 	++mp->pagealloc; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user