From 50e7545118dca4bb456d7c8120ac8f2f4c5bf6f5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 15 Dec 2003 14:48:37 +0000 Subject: Giuseppe Attardi fixed a really tricky bug --- lib/url.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/url.c b/lib/url.c index 0dcc577af..d21cab247 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3281,6 +3281,9 @@ CURLcode Curl_do(struct connectdata **connp) conn->bits.close = TRUE; /* enforce close of this connetion */ result = Curl_done(conn); /* we are so done with this */ + + /* conn is no longer a good pointer */ + if(CURLE_OK == result) { bool async; /* Now, redo the connect and get a new connection */ @@ -3288,6 +3291,7 @@ CURLcode Curl_do(struct connectdata **connp) if(CURLE_OK == result) { /* We have connected or sent away a name resolve query fine */ + conn = *connp; /* setup conn to again point to something nice */ if(async) { /* Now, if async is TRUE here, we need to wait for the name to resolve */ -- cgit v1.2.3