From 3755bffcc2fd3b031e6ea9c51e0d2e9949f8c3ce Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 23 Apr 2004 14:04:30 +0000 Subject: Gisle Vanem found and fixed a memory leak when doing (failing) Windows threaded name resolves. --- lib/hostip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/hostip.c') diff --git a/lib/hostip.c b/lib/hostip.c index e0bfe5b17..32bb03de3 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -1531,12 +1531,15 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn, } else rc = CURLE_OPERATION_TIMEDOUT; + } - destroy_thread_data(&conn->async); + destroy_thread_data(&conn->async); + + if (CURLE_OK != rc) /* close the connection, since we can't return failure here without cleaning up this connection properly */ Curl_disconnect(conn); - } + return (rc); } -- cgit v1.2.3