1
0
forked from bip/bip

Cleanup the network properly when we fail to load.

This commit is contained in:
Arnaud Cornet 2018-12-11 19:46:38 -05:00
parent 16f2be6ac2
commit e5005cea34

View File

@ -346,10 +346,10 @@ static int add_network(bip_t *bip, list_t *data)
}
#endif
if (n->serverc == 0) {
conf_die(bip, "No server in network: %s", n->name);
hash_remove_if_exists(&bip->networks, name);
free(n->name);
free(n);
conf_die(bip, "No sever in network: %s", n->name);
n = NULL;
return 0;
}