diff --git a/src/irc/core/server-setup.c b/src/irc/core/server-setup.c index b6f41e31..c1dbc52b 100644 --- a/src/irc/core/server-setup.c +++ b/src/irc/core/server-setup.c @@ -142,7 +142,8 @@ create_addr_conn(const char *address, int port, const char *password, if (ircnet == NULL) return conn; if (ircnet->nick && !(nick && *nick)) { - g_free(conn->nick); + g_free_and_null(conn->alternate_nick); + g_free(conn->nick); conn->nick = g_strdup(ircnet->nick);; } if (ircnet->username) {