aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-13 04:37:36 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-13 04:37:36 +0000
commit29194b094ca5c3c9dba726079f0a7e712bce01da (patch)
treeab104fe80ccb81801ee5e5dfbe7d469542b686d9 /apps
parentf59cb34f82a553472c7de8740a5c98a71a50cba5 (diff)
fix a place where code returns without unlocking the vm users list and various
places where code returns without destroying loaded configuration git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33785 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 313f33893..a8636a2df 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -6452,6 +6452,8 @@ static int load_config(void)
}
} else {
free(z);
+ AST_LIST_UNLOCK(&users);
+ ast_config_destroy(cfg);
return -1;
}
var = var->next;
@@ -6706,8 +6708,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");
@@ -6715,6 +6719,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);
+
switch (option) {
case 3:
if (!res)
@@ -6852,8 +6858,6 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
break;
}
- ast_config_destroy(msg_cfg);
-
if (!res) {
make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);
vms->heard[msg] = 1;