From b8b891cc25f5a5af6543ed317d76f3d88cf31f3b Mon Sep 17 00:00:00 2001 From: adam- Date: Sat, 1 Aug 2009 08:16:27 +0000 Subject: Fixed some memory leaks when setting vhosts on users git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2399 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/hs_on.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core') diff --git a/src/core/hs_on.c b/src/core/hs_on.c index 5d102273c..bbae6f73e 100644 --- a/src/core/hs_on.c +++ b/src/core/hs_on.c @@ -39,7 +39,11 @@ class CommandHSOn : public Command notice_lang(s_HostServ, u, HOST_ACTIVATED, vHost); ircdproto->SendVhost(u->nick, vIdent, vHost); if (ircd->vhost) + { + if (u->vhost) + delete [] u->vhost; u->vhost = sstrdup(vHost); + } if (ircd->vident) { if (vIdent) -- cgit