From: w00t Date: Tue, 3 Feb 2009 21:06:47 +0000 (+0000) Subject: Fix minor memory leak, patch by Darom. Closes bug #699. Thanks!` X-Git-Tag: v2.0.23~2151 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=9e29535857e1bd55a25737e7846f095e182dede2;p=user%2Fhenk%2Fcode%2Finspircd.git Fix minor memory leak, patch by Darom. Closes bug #699. Thanks!` git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11025 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 40a721121..0087b681a 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -263,6 +263,7 @@ bool BufferedSocket::DoConnect(unsigned long maxtime) this->OnError(I_ERR_CONNECT); this->Close(); this->state = I_ERROR; + delete[] addr; return false; } @@ -271,6 +272,7 @@ bool BufferedSocket::DoConnect(unsigned long maxtime) } this->state = I_CONNECTING; + delete[] addr; if (this->fd > -1) { if (!this->ServerInstance->SE->AddFd(this))