[sr-dev] git:master:ce5591e8: cnxcc: safety check before freeing call structure
Daniel-Constantin Mierla
miconda at gmail.com
Wed Nov 25 13:20:33 CET 2015
Module: kamailio
Branch: master
Commit: ce5591e8f7568f98b39d9b96a2c8debe81837a07
URL: https://github.com/kamailio/kamailio/commit/ce5591e8f7568f98b39d9b96a2c8debe81837a07
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/ce5591e8f7568f98b39d9b96a2c8debe81837a07.diff
Patch: https://github.com/kamailio/kamailio/commit/ce5591e8f7568f98b39d9b96a2c8debe81837a07.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