Module: kamailio
Branch: master
Commit: 606a8d6915f385460776b0d682b6471d2176db7f
URL:
https://github.com/kamailio/kamailio/commit/606a8d6915f385460776b0d682b6471…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-06-18T09:29:17+02:00
sipt: use static buffer to avoid pkg leak inside sipt_get_redirection_number()
---
Modified: src/modules/sipt/sipt.c
---
Diff:
https://github.com/kamailio/kamailio/commit/606a8d6915f385460776b0d682b6471…
Patch:
https://github.com/kamailio/kamailio/commit/606a8d6915f385460776b0d682b6471…
---
diff --git a/src/modules/sipt/sipt.c b/src/modules/sipt/sipt.c
index a1f0b348d1..c4b415fa7c 100644
--- a/src/modules/sipt/sipt.c
+++ b/src/modules/sipt/sipt.c
@@ -337,7 +337,7 @@ static int sipt_get_redirection_number_nai(struct sip_msg *msg,
pv_param_t *para
static int sipt_get_redirection_number(struct sip_msg *msg, pv_param_t *param, pv_value_t
*res)
{
- char *sb_s_buf = pkg_malloc(sizeof(char) * (26));
+ static char sb_s_buf[26];
str body;
body.s = get_body_part(msg, TYPE_APPLICATION,SUBTYPE_ISUP,&body.len);