Module: kamailio Branch: master Commit: c6cee2a0c2acf5174c610b610ed827a5d888c7cc URL: https://github.com/kamailio/kamailio/commit/c6cee2a0c2acf5174c610b610ed827a5...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2025-07-22T16:40:27+02:00
ims_ipsec_pcscf: fill_contact() don't leak on error
---
Modified: src/modules/ims_ipsec_pcscf/cmd.c
---
Diff: https://github.com/kamailio/kamailio/commit/c6cee2a0c2acf5174c610b610ed827a5... Patch: https://github.com/kamailio/kamailio/commit/c6cee2a0c2acf5174c610b610ed827a5...
---
diff --git a/src/modules/ims_ipsec_pcscf/cmd.c b/src/modules/ims_ipsec_pcscf/cmd.c index 4672a45906a..4271e9c519d 100644 --- a/src/modules/ims_ipsec_pcscf/cmd.c +++ b/src/modules/ims_ipsec_pcscf/cmd.c @@ -344,10 +344,9 @@ static int fill_contact( } free_sip_msg(&tmsg);
- vb = cscf_get_ue_via(m); - if(!vb) { + if((vb = cscf_get_ue_via(m)) == NULL) { LM_ERR("Reply No via body headers\n"); - return -1; + goto error; }
// populate CI with bare minimum @@ -357,8 +356,8 @@ static int fill_contact( ci->searchflag = SEARCH_RECEIVED;
if((srcip = pkg_malloc(50)) == NULL) { - LM_ERR("Error allocating memory for source IP address\n"); - return -1; + PKG_MEM_ERROR; + goto error; }
ci->received_host.len =