Browse code

cnxcc: safety check before freeing call structure

- reported by GH#417

Daniel-Constantin Mierla authored on 25/11/2015 12:19:13
Showing 1 changed files
... ...
@@ -906,6 +906,9 @@ void terminate_all_calls(credit_data_t *credit_data) {
906 906
 static void __free_call(call_t *call) {
907 907
 	struct str_hash_entry *e = NULL;
908 908
 
909
+	if(call->sip_data.callid.s==NULL)
910
+		return;
911
+
909 912
 	LM_DBG("Freeing call [%.*s]\n", call->sip_data.callid.len, call->sip_data.callid.s);
910 913
 	e = str_hash_get(_data.money.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
911 914