Cleanup the network properly when we fail to load.
This commit is contained in:
parent
16f2be6ac2
commit
e5005cea34
@ -346,10 +346,10 @@ static int add_network(bip_t *bip, list_t *data)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (n->serverc == 0) {
|
if (n->serverc == 0) {
|
||||||
|
conf_die(bip, "No server in network: %s", n->name);
|
||||||
hash_remove_if_exists(&bip->networks, name);
|
hash_remove_if_exists(&bip->networks, name);
|
||||||
free(n->name);
|
free(n->name);
|
||||||
free(n);
|
free(n);
|
||||||
conf_die(bip, "No sever in network: %s", n->name);
|
|
||||||
n = NULL;
|
n = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user