ircd: change_nick_user_host(): only update target_p->username if the buffer has actually changed (pointed out by Valgrind)

This commit is contained in:
William Pitcock 2016-01-11 22:46:49 -06:00
parent b870a5f8e9
commit cd66c5b922

View file

@ -1500,7 +1500,9 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use
target_p->username, target_p->host);
}
if (user != target_p->username)
rb_strlcpy(target_p->username, user, sizeof target_p->username);
rb_strlcpy(target_p->host, host, sizeof target_p->host);
if (changed)