Module: sip-router
Branch: tmp/build_request
Commit: 0f6dc007f9454ed000df5b6601961950e0b72367
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0f6dc00…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Tue Jul 21 11:25:39 2009 +0200
tm: local req. route: always free the tmp sip msg
---
modules/tm/uac.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/tm/uac.c b/modules/tm/uac.c
index 4e46489..c3b49be 100644
--- a/modules/tm/uac.c
+++ b/modules/tm/uac.c
@@ -397,14 +397,15 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
(unsigned int*)&buf_len1,
&dst, BUILD_NO_LOCAL_VIA|BUILD_NO_VIA1_UPDATE|
BUILD_IN_SHM);
- if (!buf1) {
- free_sip_msg(&lreq);
- } else {
+ if (likely(buf1)){
shm_free(buf);
buf = buf1;
buf_len = buf_len1;
+ /* a possible change of the method is not handled! */
}
}
+ lreq.buf=0; /* covers the obsolete DYN_BUF */
+ free_sip_msg(&lreq);
}
}
}