1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 22:26:39 +02:00

Fixed some memory leaks when setting vhosts on users

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2400 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
adam-
2009-08-01 08:16:56 +00:00
parent 97a42e4f7d
commit 217a375517
2 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -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);
}
+6 -1
View File
@@ -596,11 +596,16 @@ int do_on_id(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);
}