conversions to memory allocation wrappers (issue #6210)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-01-11 22:41:34 +00:00
parent f5b108ac99
commit 2eb7eecdd0
5 changed files with 15 additions and 25 deletions

View File

@@ -984,13 +984,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
goto out;
}
*number = '\0';
number++;
tmp = malloc(sizeof(struct localuser));
if (!tmp) {
ast_log(LOG_WARNING, "Out of memory\n");
number++;
if (!(tmp = ast_calloc(1, sizeof(*tmp)))) {
goto out;
}
memset(tmp, 0, sizeof(struct localuser));
if (opts.flags) {
ast_copy_flags(tmp, &opts,
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |