feat(fabric test):
Add parameter initialization and non-null judgment
@@ -707,6 +707,7 @@ BOAT_RESULT BoatHlfabricWalletSetNetworkInfo(BoatHlfabricWallet *wallet_ptr,
// BoatFree(wallet_ptr->network_info.endorser[i].hostName);
// }
// wallet_ptr->network_info.endorserNum = 0;
+ if(wallet_ptr != NULL){
for (i = 0; i < wallet_ptr->network_info.endorserLayoutNum; i++)
{
for (j = 0; j < wallet_ptr->network_info.layoutCfg[i].endorserGroupNum; j++)
@@ -740,6 +741,8 @@ BOAT_RESULT BoatHlfabricWalletSetNetworkInfo(BoatHlfabricWallet *wallet_ptr,
}
}
}
+
+ }
return result;
}
@@ -775,6 +778,7 @@ BoatHlfabricWallet *BoatHlfabricWalletInit(const BoatHlfabricWalletConfig *confi
wallet_ptr->network_info.endorserLayoutNum = 0;
wallet_ptr->network_info.orderCfg.endorserNumber = 0;
wallet_ptr->network_info.layoutCfg = NULL;
+ wallet_ptr->network_info.orderCfg.endorser = NULL;
// wallet_ptr->network_info.layoutCfg->endorserGroupNum = 0;
#if (BOAT_HLFABRIC_TLS_SUPPORT == 1)
#if (BOAT_HLFABRIC_TLS_IDENTIFY_CLIENT == 1)
