diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-29 22:23:27 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-29 22:23:27 +0000 |
commit | bb29c42b4e56047fa20b916e61c4a4e28f5c297d (patch) | |
tree | 995599b03fb728230fe1f8cab2926bd107e629ab /main | |
parent | 0f6a1e66b908fddc16223e8091963c48648b2083 (diff) |
Part of the merge did not happen correctly, which resulted in a compile error
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191211 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/pbx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/pbx.c b/main/pbx.c index 65c803568..278777454 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -3605,7 +3605,7 @@ void ast_str_substitute_variables_full(struct ast_str **buf, ssize_t maxlen, str cp4 = ast_func_read2(c, finalvars, &substr3, 0) ? NULL : ast_str_buffer(substr3); /* Don't deallocate the varshead that was passed in */ memcpy(&bogus->varshead, &old, sizeof(bogus->varshead)); - ast_channel_free(bogus); + ast_channel_release(bogus); } else { ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution. Function results may be blank.\n"); } @@ -3694,7 +3694,7 @@ void ast_str_substitute_variables_varshead(struct ast_str **buf, ssize_t maxlen, void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int count, size_t *used) { /* Substitutes variables into cp2, based on string cp1, cp2 NO LONGER NEEDS TO BE ZEROED OUT!!!! */ - char *cp4; + char *cp4 = NULL; const char *tmp, *whereweare, *orig_cp2 = cp2; int length, offset, offset2, isfunction; char *workspace = NULL; @@ -3805,8 +3805,9 @@ void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead /* Don't deallocate the varshead that was passed in */ memcpy(&bogus->varshead, &old, sizeof(bogus->varshead)); bogus = ast_channel_release(bogus); - } else + } else { ast_log(LOG_ERROR, "Unable to allocate bogus channel for variable substitution. Function results may be blank.\n"); + } } ast_debug(2, "Function result is '%s'\n", cp4 ? cp4 : "(null)"); } else { |