} 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;
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");
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)
}
}
- ast_config_destroy(msg_cfg);
-
if (!res) {
make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);
vms->heard[msg] = 1;