From f6c5e6526689ee0820e3e2495774525691710d65 Mon Sep 17 00:00:00 2001 From: BJ Weschke Date: Fri, 13 Jan 2006 03:34:31 +0000 Subject: More memory wrapper cleanup. #6224 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8045 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_milliwatt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'apps/app_milliwatt.c') diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c index 6c7718f52..c642d837d 100644 --- a/apps/app_milliwatt.c +++ b/apps/app_milliwatt.c @@ -41,6 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" #include "asterisk/pbx.h" #include "asterisk/module.h" +#include "asterisk/utils.h" static char *tdesc = "Digital Milliwatt (mu-law) Test Application"; @@ -59,11 +60,7 @@ static char digital_milliwatt[] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} ; static void *milliwatt_alloc(struct ast_channel *chan, void *params) { -int *indexp; - indexp = ast_malloc(sizeof(*indexp)); - if (indexp == NULL) return(NULL); - *indexp = 0; - return(indexp); + return ast_calloc(1, sizeof(int)); } static void milliwatt_release(struct ast_channel *chan, void *data) -- cgit v1.2.3