Skip to content

Commit

Permalink
Fix a small memory leak in inspsocket, thanks to Darom for the patch!…
Browse files Browse the repository at this point in the history
… Fixes bug #699.

git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@11026 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
rburchell committed Feb 3, 2009
1 parent edbd23c commit cbbb5ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/inspsocket.cpp
Expand Up @@ -320,6 +320,7 @@ bool InspSocket::DoConnect()
this->OnError(I_ERR_CONNECT);
this->Close();
this->state = I_ERROR;
delete[] addr;
return false;
}

Expand All @@ -332,6 +333,7 @@ bool InspSocket::DoConnect()
ioctlsocket(this->fd, FIONBIO, &flags);
#endif
this->state = I_CONNECTING;
delete[] addr;
if (this->fd > -1)
{
if (!this->Instance->SE->AddFd(this))
Expand Down

0 comments on commit cbbb5ba

Please sign in to comment.