summaryrefslogtreecommitdiff
path: root/cel/cel_custom.c
diff options
context:
space:
mode:
Diffstat (limited to 'cel/cel_custom.c')
-rw-r--r--cel/cel_custom.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cel/cel_custom.c b/cel/cel_custom.c
index d1655413f..d05a1260c 100644
--- a/cel/cel_custom.c
+++ b/cel/cel_custom.c
@@ -191,14 +191,15 @@ static enum ast_module_load_result load_module(void)
{
if (AST_RWLIST_WRLOCK(&sinks)) {
ast_log(LOG_ERROR, "Unable to lock sink list. Load failed.\n");
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
load_config();
AST_RWLIST_UNLOCK(&sinks);
if (ast_cel_backend_register(CUSTOM_BACKEND_NAME, custom_log)) {
- return AST_MODULE_LOAD_FAILURE;
+ free_config();
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
}
@@ -207,7 +208,7 @@ static int reload(void)
{
if (AST_RWLIST_WRLOCK(&sinks)) {
ast_log(LOG_ERROR, "Unable to lock sink list. Load failed.\n");
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
free_config();