perf(non-null judgment):
add non-null judgment of "layoutCfg.groupCfg" in  BoatHlfabricDiscoverySubmit()
@@ -934,6 +934,10 @@ BOAT_RESULT BoatHlfabricDiscoverySubmit(BoatHlfabricTx *tx_ptr, const BoatHlfabr
tx_ptr->wallet_ptr->network_info.layoutCfg[i].endorserGroupNum = discoverResult.cc_res.layouts[i].num;
tx_ptr->wallet_ptr->network_info.layoutCfg[i].groupCfg = BoatMalloc(discoverResult.cc_res.layouts[i].num * sizeof(BoatHlfabricNodeGroupCfg));
+ if(tx_ptr->wallet_ptr->network_info.layoutCfg[i].groupCfg == NULL){
+ BoatLog(BOAT_LOG_CRITICAL, "Fail to allocate layoutCfg[%d].groupCfg buffer.",i);
+ boat_throw(BOAT_ERROR_COMMON_OUT_OF_MEMORY, BoatHlfabricDiscoverySubmit_exception);
+ }
for ( j = 0; j < discoverResult.cc_res.layouts[i].num; j++)
{
tx_ptr->wallet_ptr->network_info.layoutCfg[i].groupCfg[j].endorserNumber = discoverResult.cc_res.layouts[i].groups[j].numEndorsers;
