Module: sip-router
Branch: master
Commit: 6a51d9e87ac2e51a3c0473e11b3347739ec33dd8
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6a51d9e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Sep 13 13:47:00 2013 +0200
textops: free result of subst transformation when is larger than target buffer
---
modules/textops/txt_var.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/textops/txt_var.c b/modules/textops/txt_var.c
index 45fb6bb..6792f56 100644
--- a/modules/textops/txt_var.c
+++ b/modules/textops/txt_var.c
@@ -94,6 +94,8 @@ int tr_txt_eval_re(struct sip_msg *msg, tr_param_t *tp, int subtype,
{
LM_ERR("subst result too big %d, increase buffer size\n",
result->len);
+ pkg_free(result->s);
+ pkg_free(result);
goto error;
}
memcpy(tr_txt_buf, result->s, result->len);