[sr-dev] git:4.3:1c6fcd1b: cnxcc: safety check before freeing call structure
Daniel-Constantin Mierla
miconda at gmail.com
Wed Nov 25 13:20:58 CET 2015
Module: kamailio
Branch: 4.3
Commit: 1c6fcd1bc43165cd9a8732489cb2fbe83e2aa1ac
URL: https://github.com/kamailio/kamailio/commit/1c6fcd1bc43165cd9a8732489cb2fbe83e2aa1ac
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-11-25T13:20:43+01:00
cnxcc: safety check before freeing call structure
- reported by GH#417
(cherry picked from commit ce5591e8f7568f98b39d9b96a2c8debe81837a07)
---
Modified: modules/cnxcc/cnxcc_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/1c6fcd1bc43165cd9a8732489cb2fbe83e2aa1ac.diff
Patch: https://github.com/kamailio/kamailio/commit/1c6fcd1bc43165cd9a8732489cb2fbe83e2aa1ac.patch
---
diff --git a/modules/cnxcc/cnxcc_mod.c b/modules/cnxcc/cnxcc_mod.c
index b8270ca..f24e8bd 100644
--- a/modules/cnxcc/cnxcc_mod.c
+++ b/modules/cnxcc/cnxcc_mod.c
@@ -906,6 +906,9 @@ void terminate_all_calls(credit_data_t *credit_data) {
static void __free_call(call_t *call) {
struct str_hash_entry *e = NULL;
+ if(call->sip_data.callid.s==NULL)
+ return;
+
LM_DBG("Freeing call [%.*s]\n", call->sip_data.callid.len, call->sip_data.callid.s);
e = str_hash_get(_data.money.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
More information about the sr-dev
mailing list