summaryrefslogtreecommitdiff
path: root/cdr/cdr_custom.c
diff options
context:
space:
mode:
Diffstat (limited to 'cdr/cdr_custom.c')
-rw-r--r--cdr/cdr_custom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c
index 2a3b1a1dd..51235db7f 100644
--- a/cdr/cdr_custom.c
+++ b/cdr/cdr_custom.c
@@ -184,7 +184,9 @@ static int custom_log(struct ast_cdr *cdr)
static int unload_module(void)
{
- ast_cdr_unregister(name);
+ if (ast_cdr_unregister(name)) {
+ return -1;
+ }
if (AST_RWLIST_WRLOCK(&sinks)) {
ast_cdr_register(name, ast_module_info->description, custom_log);