From 7e876de88995807350e401e277384a10fe5b9d74 Mon Sep 17 00:00:00 2001 From: nnposter Date: Fri, 18 Aug 2017 02:24:37 +0000 Subject: [PATCH] Makes sure that nsock_pool is properly disposed of if the proxy connection fails. Closes #973 --- ncat/ncat_connect.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ncat/ncat_connect.c b/ncat/ncat_connect.c index d8c73ab1b..5695800a3 100644 --- a/ncat/ncat_connect.c +++ b/ncat/ncat_connect.c @@ -1049,7 +1049,10 @@ int ncat_connect(void) } if (connect_socket == -1) + { + nsock_pool_delete(mypool); return 1; + } /* Clear out whatever is left in the socket buffer which may be already sent by proxy server along with http response headers. */ //line = socket_buffer_remainder(&stateful_buf, &n);