Module: kamailio
Branch: master
Commit: ce5591e8f7568f98b39d9b96a2c8debe81837a07
URL:
https://github.com/kamailio/kamailio/commit/ce5591e8f7568f98b39d9b96a2c8deb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-11-25T13:20:25+01:00
cnxcc: safety check before freeing call structure
- reported by GH#417
---
Modified: modules/cnxcc/cnxcc_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ce5591e8f7568f98b39d9b96a2c8deb…
Patch:
https://github.com/kamailio/kamailio/commit/ce5591e8f7568f98b39d9b96a2c8deb…
---
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);