aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_cdr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/app_cdr.c b/apps/app_cdr.c
index e8f76a602..a70d9d2f5 100644
--- a/apps/app_cdr.c
+++ b/apps/app_cdr.c
@@ -51,8 +51,7 @@ static int nocdr_exec(struct ast_channel *chan, void *data)
u = ast_module_user_add(chan);
if (chan->cdr) {
- ast_cdr_free(chan->cdr);
- chan->cdr = NULL;
+ ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED);
}
ast_module_user_remove(u);