Merged revisions 81682 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Thu, 6 Sep 2007 15:21:45 +0000 (15:21 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 6 Sep 2007 15:21:45 +0000 (15:21 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81682 | mmichelson | 2007-09-06 10:20:36 -0500 (Thu, 06 Sep 2007) | 5 lines

Fixes a memory leak

(closes issue #10658, reported and patched by Ivan)

........

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

res/res_features.c

index a9c252b..dea8d80 100644 (file)
@@ -1990,7 +1990,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;