const CfgLineType *pCfg;
StrBuf *Line;
StrBuf *InStr;
- OneRoomNetCfg *OneRNCfg;
+ OneRoomNetCfg *OneRNCfg = NULL;
fd = open(filename, O_NONBLOCK|O_RDONLY);
if (fd == -1) {
return 0;
}
if (*pOneRNCfg != NULL)
+ {
OneRNCfg = *pOneRNCfg;
+ FreeRoomNetworkStructContent (OneRNCfg);
+ }
else
OneRNCfg = malloc(sizeof(OneRoomNetCfg));
memset(OneRNCfg, 0, sizeof(OneRoomNetCfg));