Unbind clients of type IRC_TYPE_TRUST_CLIENT.

The clients connection was nulled in irc_closed, but the clients were
not removed from the link, which caused a segfault on successful
connection.

https://projects.duckcorp.org/issues/637
This commit is contained in:
Arnaud Cornet 2018-12-17 22:33:19 -05:00
parent 814d54c676
commit 60122ef160
1 changed files with 3 additions and 0 deletions

View File

@ -2033,6 +2033,9 @@ void irc_client_close(struct link_client *ic)
log_client_none_connected(LINK(ic)->log);
}
irc_client_free(ic);
} else if (TYPE(ic) == IRC_TYPE_TRUST_CLIENT) {
unbind_from_link(ic);
irc_client_free(ic);
} else if (TYPE(ic) == IRC_TYPE_LOGING_CLIENT) {
irc_client_free(ic);
}