]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes a memory leak
authorMark Michelson <mmichelson@digium.com>
Thu, 6 Sep 2007 15:20:36 +0000 (15:20 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 6 Sep 2007 15:20:36 +0000 (15:20 +0000)
(closes issue #10658, reported and patched by Ivan)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81682 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_features.c

index dd037ab6473ca315c1f56fd035582a4d126a4e04..b863be921c99990dd253359727e57e987fc40bd5 100644 (file)
@@ -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;