diff --git a/res/res_features.c b/res/res_features.c index dd037ab647..b863be921c 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1568,7 +1568,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast /* absorb the peer cdr */ ast_cdr_merge(bridge_cdr, peer->cdr); - if (ast_test_flag(peer->cdr, AST_CDR_FLAG_LOCKED)) + if (!ast_test_flag(peer->cdr, AST_CDR_FLAG_LOCKED)) ast_cdr_discard(peer->cdr); /* if locked cdrs are in peer, they are taken over in the merge */ peer->cdr = NULL;