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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-02-13T11:58:21+01:00

pv: free buf uri in case of error setting xto attr

---

Modified: src/modules/pv/pv_core.c

---

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

---

diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 38d46c01dba..56d96b20d75 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -3817,6 +3817,9 @@ int pv_set_xto_attr(struct sip_msg *msg, pv_param_t 
*param, int op,
        return 0;
 
 error:
+       if(buf_uri.s != 0) {
+               pkg_free(buf_uri.s);
+       }
        if(buf.s != NULL) {
                pkg_free(buf.s);
        }

_______________________________________________
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