[sr-dev] git:4.3:5fcac5c5: usrloc: fix mem leak when closing expired TCP

Camille Oudot camille.oudot at orange.com
Wed Nov 25 12:00:14 CET 2015


Module: kamailio
Branch: 4.3
Commit: 5fcac5c54fd487014efe1645f4db0e31dd6564e7
URL: https://github.com/kamailio/kamailio/commit/5fcac5c54fd487014efe1645f4db0e31dd6564e7

Author: Camille Oudot <camille.oudot at orange.com>
Committer: Camille Oudot <camille.oudot at orange.com>
Date: 2015-11-25T11:59:39+01:00

usrloc: fix mem leak when closing expired TCP

CONN_EOF handler already decreases the reference counter for us

(cherry picked from commit daa2509a58438505a6faa57e1a8befcc667a3b28)

---

Modified: modules/usrloc/urecord.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5fcac5c54fd487014efe1645f4db0e31dd6564e7.diff
Patch: https://github.com/kamailio/kamailio/commit/5fcac5c54fd487014efe1645f4db0e31dd6564e7.patch

---

diff --git a/modules/usrloc/urecord.c b/modules/usrloc/urecord.c
index 36f747b..414a958 100644
--- a/modules/usrloc/urecord.c
+++ b/modules/usrloc/urecord.c
@@ -252,7 +252,6 @@ static inline int close_connection(int conid) {
 		msg[1] = CONN_EOF;
 
 		n = send_all(unix_tcp_sock, msg, sizeof(msg));
-		tcpconn_put(con);
 		if (unlikely(n <= 0)){
 			LM_ERR("failed to send close request: %s (%d)\n", strerror(errno), errno);
 			return 0;




More information about the sr-dev mailing list