Module: kamailio
Branch: master
Commit: 0d68c816bd72be78fef827ee923897f90c521570
URL: 
https://github.com/kamailio/kamailio/commit/0d68c816bd72be78fef827ee923897f90c521570

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-11-19T12:20:21+01:00

textops: free substitution expression for subst_v()

---

Modified: src/modules/textops/textops.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/0d68c816bd72be78fef827ee923897f90c521570.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0d68c816bd72be78fef827ee923897f90c521570.patch

---

diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c
index d28d7f508cf..8be84dfca3c 100644
--- a/src/modules/textops/textops.c
+++ b/src/modules/textops/textops.c
@@ -1555,6 +1555,7 @@ static int subst_v_helper_f(
                if(nmatches < 0) {
                        LM_ERR("substitution failed\n");
                }
+               subst_expr_free(se);
                return -1;
        }
        memset(&val, 0, sizeof(pv_value_t));
@@ -1565,6 +1566,7 @@ static int subst_v_helper_f(
 
        pkg_free(result->s);
        pkg_free(result);
+       subst_expr_free(se);
        return 1;
 }
 

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to