Module: kamailio
Branch: master
Commit: d84451d9a1b144b5aee4678df051cb65e8db2595
URL:
https://github.com/kamailio/kamailio/commit/d84451d9a1b144b5aee4678df051cb6…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2017-10-02T11:03:59+02:00
siptrace: fix memory leak in hlog
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d84451d9a1b144b5aee4678df051cb6…
Patch:
https://github.com/kamailio/kamailio/commit/d84451d9a1b144b5aee4678df051cb6…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 1969384d41..81f924efd5 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -2349,6 +2349,9 @@ static int hlog(struct sip_msg *msg, str *correlationid, str
*message) {
hostent2su(&dst.to, &p->host, p->addr_idx,
(p->port)?p->port:SIP_PORT);
LM_DBG("setting up the socket_info\n");
+ free_proxy(p); /* frees only p content, not p itself */
+ pkg_free(p);
+
if (force_send_sock_str.s) {
LM_DBG("force_send_sock activated, grep for the sock_info\n");
si = grep_sock_info(&force_send_sock_uri->host,