diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-06 19:40:04 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-06 19:40:04 +0000 |
commit | ad20d95ca983276c4e2721db687e24255f6ff61c (patch) | |
tree | 68740635dcdb88cb914638fe42bac9379f1a14f4 /apps | |
parent | 521f1359c8e03d93bc38c2d016800935ab7921bb (diff) |
Don't try to check the result of alloca ...
... testing mantis/svn stuff ...
(issue #9828)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67806 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 50da060c5..a08d2c06d 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2218,14 +2218,12 @@ static int sendpage(char *srcemail, char *pager, int msgnum, char *context, char struct ast_channel *ast; if ((ast = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, "", "", "", 0, 0))) { char *passdata; - int vmlen = strlen(pagerbody)*3 + 200; - if ((passdata = alloca(vmlen))) { - memset(passdata, 0, vmlen); - prep_email_sub_vars(ast, vmu, msgnum + 1, context, mailbox, cidnum, cidname, dur, date, passdata, vmlen, category); - pbx_substitute_variables_helper(ast, pagerbody, passdata, vmlen); - fprintf(p, "%s\n", passdata); - } else - ast_log(LOG_WARNING, "Cannot allocate workspace for variable substitution\n"); + int vmlen = strlen(pagerbody) * 3 + 200; + passdata = alloca(vmlen); + memset(passdata, 0, vmlen); + prep_email_sub_vars(ast, vmu, msgnum + 1, context, mailbox, cidnum, cidname, dur, date, passdata, vmlen, category); + pbx_substitute_variables_helper(ast, pagerbody, passdata, vmlen); + fprintf(p, "%s\n", passdata); ast_channel_free(ast); } else ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n"); |