diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-25 20:07:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-25 20:07:25 +0000 |
commit | a4e29fc330705b1aa738ea6681c4d9f901a87a1d (patch) | |
tree | 52a52c9789a3a5537332e6f3264109f57263fa46 /src | |
parent | 3a8f99c0573756ae8235dd2a1bc07c73797e2821 (diff) |
kill_link safety checks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3752 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/users.cpp | 4 |
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) |