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:
+6
-1
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user