Module: sems
Branch: master
Commit: ad9e3b075dfd67d552ae2432fcd4abbea8f2928e
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=ad9e3b075dfd67d552ae2432fcd4abbea8f2928e

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Tue May 13 11:34:05 2014 +0200

sip: fix memory leak while sending 200/ACK

---

 core/sip/trans_layer.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/core/sip/trans_layer.cpp b/core/sip/trans_layer.cpp
index 0cbdecc..003f638 100644
--- a/core/sip/trans_layer.cpp
+++ b/core/sip/trans_layer.cpp
@@ -1333,9 +1333,11 @@ int _trans_layer::send_request(sip_msg* msg, 
trans_ticket* tt,
            return err;
        }
 
-       if(tt->_t) {
+       if(tt->_t && (method != sip_request::ACK)) {
            // save flags & target set in transaction
            tt->_t->flags = flags;
+
+           if(tt->_t->targets) delete tt->_t->targets;
            tt->_t->targets = targets.release();
 
            if(tt->_t->targets->has_next()){

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to