diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-11 22:41:34 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-11 22:41:34 +0000 |
commit | 9909f9bd4d7afbb49685b706184f22d82505a7ff (patch) | |
tree | d4ab39f3172c244d70ca7bfc20e75bccec31b341 /apps/app_dial.c | |
parent | f5498b059fb6138859d37da7f3095ef1a1ee1901 (diff) |
conversions to memory allocation wrappers (issue #6210)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7991 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index dac6ac4ca..e6571c9ef 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -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 | |