diff options
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 | |