diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-19 21:53:44 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-19 21:53:44 +0000 |
commit | 4f62aeb27ebf1cb142d34121defe1a47e8a17444 (patch) | |
tree | c4386cfa878414a553b502e9a3109099795d221e /src/modules | |
parent | 99caa2a956e428096fcd42d5fd3b89aeccb07491 (diff) |
Fixed fd leaks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1133 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_ident.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 68934ae68..90a6f448a 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -100,6 +100,8 @@ class RFC1413 { // ... so that error isnt fatal, like the rest. Srv->Log(DEBUG,"Ident: connect failed for: "+std::string(user->ip)); + close(this->fd); + shutdown(this->fd,2); return false; } } @@ -118,6 +120,8 @@ class RFC1413 { timeout = true; Srv->SendServ(u->fd,"NOTICE "+std::string(u->nick)+" :*** Could not find your ident, using "+std::string(u->ident)+" instead."); + close(this->fd); + shutdown(this->fd,2); return false; } pollfd polls; @@ -147,6 +151,8 @@ class RFC1413 if ((getsockname(this->u->fd,(sockaddr*)&sock_us,&uslen) || getpeername(this->u->fd, (sockaddr*)&sock_them, &themlen))) { Srv->Log(DEBUG,"Ident: failed to get socket names, bailing to state 3"); + close(this->fd); + shutdown(this->fd,2); state = IDENT_STATE_DONE; } else |