[sr-dev] git:master:daa2509a: usrloc: fix mem leak when closing expired TCP

Camille Oudot camille.oudot at orange.com
Wed Nov 25 11:48:26 CET 2015


Module: kamailio
Branch: master
Commit: daa2509a58438505a6faa57e1a8befcc667a3b28
URL: https://github.com/kamailio/kamailio/commit/daa2509a58438505a6faa57e1a8befcc667a3b28

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

usrloc: fix mem leak when closing expired TCP

CONN_EOF handler already decreases the reference counter for us

---

Modified: modules/usrloc/urecord.c

---

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

---

diff --git a/modules/usrloc/urecord.c b/modules/usrloc/urecord.c
index 6b30336..7f3a1dd 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