summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-25 20:07:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-25 20:07:25 +0000
commita4e29fc330705b1aa738ea6681c4d9f901a87a1d (patch)
tree52a52c9789a3a5537332e6f3264109f57263fa46
parent3a8f99c0573756ae8235dd2a1bc07c73797e2821 (diff)
kill_link safety checks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3752 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/users.cpp4
1 files changed, 3 insertions, 1 deletions
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)