More memory wrapper cleanup. #6224

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
BJ Weschke
2006-01-13 03:34:31 +00:00
parent 8637b23569
commit f6c5e65266
6 changed files with 22 additions and 24 deletions

View File

@@ -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)