Module: sip-router
Branch: 4.0
Commit: e2642ea25cc19344d6e3e7f71e9df1cd7ef2532d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e2642ea…
Author: Peter Dunkley <peter.dunkley(a)crocodilertc.net>
Committer: Peter Dunkley <peter.dunkley(a)crocodilertc.net>
Date: Tue Oct 1 10:52:01 2013 +0100
core: fix TCP connection leak
- patch provided by Vitally Aleksandrov
(cherry picked from commit 6cfd13cbddd1869ffbc947fdecd77d18a3fcb886)
---
msg_translator.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/msg_translator.c b/msg_translator.c
index 5783b7e..fa7834f 100644
--- a/msg_translator.c
+++ b/msg_translator.c
@@ -2505,9 +2505,11 @@ char* via_builder( unsigned int *len,
} else if (con->rcv.proto==PROTO_WSS) {
memcpy(line_buf+MY_VIA_LEN-4, "WSS ", 4);
} else {
+ tcpconn_put(con);
LOG(L_CRIT, "BUG: via_builder: unknown proto %d\n", con->rcv.proto);
return 0;
}
+ tcpconn_put(con);
}else if (send_info->proto==PROTO_WSS){
memcpy(line_buf+MY_VIA_LEN-4, "WSS ", 4);
}else{