Remove dead links from the list of all links

Fix segfault that occurs when bip admin users use:
/BIP DEL_CONN <connection name>
/BIP ADD_CONN <connection name> <network>

Closes #325
This commit is contained in:
Pierre-Louis Bonicoli 2014-07-15 02:31:19 +02:00
parent 88242715f4
commit f7ace64abe
1 changed files with 2 additions and 0 deletions

View File

@ -2625,6 +2625,8 @@ void link_kill(bip_t *bip, struct link *link)
while ((ci = list_remove_first(&link->chan_infos_order)))
free(ci);
list_remove(&bip->link_list, link);
MAYFREE(link->username);
MAYFREE(link->realname);
MAYFREE(link->s_password);