Commit 3dae026c authored by DONG Anyuan's avatar DONG Anyuan

Fix Coverity Scan CID 341067 (Null-checking mac_MainConfig suggests that it...

Fix Coverity Scan CID 341067 (Null-checking mac_MainConfig suggests that it may be null, but it has already been dereferenced on all paths leading to the check.)
parent 1de860bc
......@@ -3928,18 +3928,16 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
free(quantityConfig);
quantityConfig = NULL;
if(mac_MainConfig){
if(mac_MainConfig->ul_SCH_Config){
free(mac_MainConfig->ul_SCH_Config);
mac_MainConfig->ul_SCH_Config = NULL;
}
if(mac_MainConfig->phr_Config){
free(mac_MainConfig->phr_Config);
mac_MainConfig->phr_Config = NULL;
}
free(mac_MainConfig);
mac_MainConfig = NULL;
if(mac_MainConfig->ul_SCH_Config){
free(mac_MainConfig->ul_SCH_Config);
mac_MainConfig->ul_SCH_Config = NULL;
}
if(mac_MainConfig->phr_Config){
free(mac_MainConfig->phr_Config);
mac_MainConfig->phr_Config = NULL;
}
free(mac_MainConfig);
mac_MainConfig = NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment