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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2015-09-23T14:41:07+02:00

Merge pull request #337 from doublec/textops_null_dereference

textops: prevent null dereference on tr_txt_eval_re error

---

Modified: modules/textops/txt_var.c

---

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

---

diff --git a/modules/textops/txt_var.c b/modules/textops/txt_var.c
index 0f704e3..41201f7 100644
--- a/modules/textops/txt_var.c
+++ b/modules/textops/txt_var.c
@@ -124,7 +124,7 @@ int tr_txt_eval_re(struct sip_msg *msg, tr_param_t *tp, int 
subtype,
        return 0;
 
 error:
-       if (tp->type == TR_PARAM_SPEC) {
+       if (tp->type == TR_PARAM_SPEC && se!=NULL) {
                subst_expr_free(se);
        }
        return -1;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to