From 00eab592de15d802dac22e4680f982af110f8c7a Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Fri, 8 Feb 2008 14:31:34 +0000 Subject: [PATCH] - fixed mem leak in reply send. git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@701 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/plug-in/sipctrl/SipCtrlInterface.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/plug-in/sipctrl/SipCtrlInterface.cpp b/core/plug-in/sipctrl/SipCtrlInterface.cpp index 9de0dcea..238219ba 100644 --- a/core/plug-in/sipctrl/SipCtrlInterface.cpp +++ b/core/plug-in/sipctrl/SipCtrlInterface.cpp @@ -301,12 +301,14 @@ int SipCtrlInterface::send(const AmSipReply &rep) copy_hdrs_wr(&c,msg.hdrs); content_type_wr(&c,stl2cstr(rep.content_type)); - string hdrs(hdrs_buf,hdrs_len); + int ret = tl->send_reply(get_trans_bucket(h),(sip_trans*)t, + rep.code,stl2cstr(rep.reason), + stl2cstr(rep.local_tag), + cstring(hdrs_buf,hdrs_len), stl2cstr(rep.body)); - return tl->send_reply(get_trans_bucket(h),(sip_trans*)t, - rep.code,stl2cstr(rep.reason), - stl2cstr(rep.local_tag), - stl2cstr(hdrs), stl2cstr(rep.body)); + delete [] hdrs_buf; + + return ret; } #define DBG_PARAM(p)\