From a4e29fc330705b1aa738ea6681c4d9f901a87a1d Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 25 Mar 2006 20:07:25 +0000 Subject: kill_link safety checks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3752 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/users.cpp b/src/users.cpp index fbbe0a25f..0620a9e0c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -437,6 +437,8 @@ void DeleteOper(userrec* user) void kill_link(userrec *user,const char* r) { user_hash::iterator iter = clientlist.find(user->nick); + if (iter == clientlist.end()) + return; char reason[MAXBUF]; @@ -495,8 +497,8 @@ void kill_link(userrec *user,const char* r) } } clientlist.erase(iter); + delete user; } - delete user; } WhoWasGroup::WhoWasGroup(userrec* user) : host(NULL), dhost(NULL), ident(NULL), server(NULL), gecos(NULL), signon(user->signon) -- cgit v1.2.3