summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hs_on.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hs_on.c b/src/core/hs_on.c
index 45777930b..35e44bbfb 100644
--- a/src/core/hs_on.c
+++ b/src/core/hs_on.c
@@ -84,11 +84,16 @@ int do_on(User * u)
}
anope_cmd_vhost_on(u->nick, vIdent, vHost);
if (ircd->vhost) {
+ if (u->vhost)
+ free(u->vhost);
u->vhost = sstrdup(vHost);
}
if (ircd->vident) {
- if (vIdent)
+ if (vIdent) {
+ if (u->vident)
+ free(u->vident);
u->vident = sstrdup(vIdent);
+ }
}
set_lastmask(u);
}