aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-13 05:04:22 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-13 05:04:22 +0000
commitc0a42fbdc9b51ac430e82616cdccb8c544f5b774 (patch)
treeea87c56db4cdc89dc1d0212c4f852bc8d0ea349a /apps
parentb84368cafab80dafcc75ec6c68b3c6874426ff88 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@33812 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_festival.c3
-rw-r--r--apps/app_voicemail.c12
2 files changed, 12 insertions, 3 deletions
diff --git a/apps/app_festival.c b/apps/app_festival.c
index 3906d604a..941e1b7a0 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -472,6 +472,9 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if ( read_data == -1 )
{
ast_log(LOG_WARNING,"Unable to read from cache/festival fd");
+ close(fd);
+ ast_config_destroy(cfg);
+ LOCAL_USER_REMOVE(u);
return -1;
}
n += read_data;
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index b61b54d62..c08a563e8 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -6172,10 +6172,14 @@ static int load_config(void)
} else {
ast_log(LOG_WARNING, "Out of memory while reading voicemail config\n");
free(z);
+ ast_mutex_unlock(&vmlock);
+ ast_config_destroy(cfg);
return -1;
}
} else {
ast_log(LOG_WARNING, "Out of memory while reading voicemail config\n");
+ ast_mutex_unlock(&vmlock);
+ ast_config_destroy(cfg);
return -1;
}
var = var->next;
@@ -6435,8 +6439,10 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
return 0;
}
- if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")))
+ if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime"))) {
+ ast_config_destroy(msg_cfg);
return 0;
+ }
cid = ast_variable_retrieve(msg_cfg, "message", "callerid");
@@ -6444,6 +6450,8 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
if (!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */
context = ast_variable_retrieve(msg_cfg, "message","macrocontext");
+ ast_config_destroy(msg_cfg);
+
if (option == 3) {
if (!res)
@@ -6576,8 +6584,6 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
}
}
- ast_config_destroy(msg_cfg);
-
if (!res) {
make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);
vms->heard[msg] = 1;