From cd66c5b922aecd434d503aa77eb0cc38345d7c58 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 11 Jan 2016 22:46:49 -0600 Subject: [PATCH] ircd: change_nick_user_host(): only update target_p->username if the buffer has actually changed (pointed out by Valgrind) --- ircd/s_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ircd/s_user.c b/ircd/s_user.c index 77577bf18..ad95ff54d 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -1500,7 +1500,9 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use target_p->username, target_p->host); } - rb_strlcpy(target_p->username, user, sizeof target_p->username); + 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)