From cbbb5ba03f81a695e1bc1ed05578a62a9fd5ef48 Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 3 Feb 2009 21:09:41 +0000 Subject: [PATCH] Fix a small memory leak in inspsocket, thanks to Darom for the patch! Fixes bug #699. git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@11026 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index a1c2ebbe4..83b2026d0 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -320,6 +320,7 @@ bool InspSocket::DoConnect() this->OnError(I_ERR_CONNECT); this->Close(); this->state = I_ERROR; + delete[] addr; return false; } @@ -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))