summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hs_off.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hs_off.c b/src/core/hs_off.c
index 54bfeca75..045061657 100644
--- a/src/core/hs_off.c
+++ b/src/core/hs_off.c
@@ -75,8 +75,12 @@ int do_off(User * u)
vident = getvIdent(u->nick);
if (vhost == NULL && vident == NULL)
notice_lang(s_HostServ, u, HOST_NOT_ASSIGNED);
- else
+ else {
anope_cmd_vhost_off(u);
+ if (u->vhost)
+ free(u->vhost);
+ u->vhost = NULL;
+ }
} else {
notice_lang(s_HostServ, u, HOST_ID);
}