void destroy_network_cfgs(void)
{
HashList *pCfgTypeHash = CfgTypeHash;
- HashList *pRoomConfigs = RoomConfigs;
+ HashList *pRoomConfigs;
- CfgTypeHash = NULL;
+ begin_critical_section(S_NETCONFIGS);
+ pRoomConfigs = RoomConfigs;
RoomConfigs = NULL;
-
- DeleteHash(&pCfgTypeHash);
+ end_critical_section(S_NETCONFIGS);
DeleteHash(&pRoomConfigs);
+
+ CfgTypeHash = NULL;
+ DeleteHash(&pCfgTypeHash);
}
/*