aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-23 14:04:30 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-23 14:04:30 +0000
commit3755bffcc2fd3b031e6ea9c51e0d2e9949f8c3ce (patch)
tree5a5cb93f60d028c0d19e58788c4f9a03e02c0025
parent2a0a3053006632786b73f2e8ae6239e119b8ede9 (diff)
Gisle Vanem found and fixed a memory leak when doing (failing) Windows
threaded name resolves.
-rw-r--r--CHANGES3
-rw-r--r--lib/hostip.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 29262e27e..09b7482cc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@
Changelog
Daniel (23 April 2004)
+- Gisle Vanem found and fixed a memory leak when doing (failing) Windows
+ threaded name resolves.
+
- I also added test case 163 just to make sure -F "var=<file" works fine and
can pass on characters such as newlines, carriage-return and tabs.
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);
}