summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-09-04 15:35:02 +0000
committerMark Michelson <mmichelson@digium.com>2012-09-04 15:35:02 +0000
commit1b6cf69e7bcdeaab2a0243ddfe5ae7aa8d3642db (patch)
treedec68d7f9420aab0c89fadec65e518cba8116058 /apps
parente7ef4698261752b279bb4ee51a4f0b32b2531bd5 (diff)
Prevent crash from using app_page with no confbridge.conf file provided.
Also prevents other potential crashes when using aco API with uninitialized aco_info structs. (closes issue ASTERISK-20305) reported by Noah Engelberth Tested by Noah Engelberth Review: https://reviewboard.asterisk.org/r/2086 ........ Merged revisions 372135 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_confbridge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 90954b814..adbe0d150 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -2832,6 +2832,10 @@ static int load_module(void)
{
int res = 0;
+ if (conf_load_config(0)) {
+ ast_log(LOG_ERROR, "Unable to load config. Not loading module.\n");
+ return AST_MODULE_LOAD_DECLINE;
+ }
if ((ast_custom_function_register(&confbridge_function))) {
return AST_MODULE_LOAD_FAILURE;
}
@@ -2870,10 +2874,6 @@ static int load_module(void)
return AST_MODULE_LOAD_FAILURE;
}
- if (conf_load_config(0)) {
- ast_log(LOG_ERROR, "Unable to load config. Not loading module.\n");
- return AST_MODULE_LOAD_DECLINE;
- }
return AST_MODULE_LOAD_SUCCESS;
}