aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-08-26 21:28:57 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-08-26 21:28:57 +0000
commit4b01dfe369896a8a93a3c82228c755a03da731e9 (patch)
tree613f4dc7df725a87e4a6b9d7247111cdbc4509f0 /lib/url.c
parentfc09d10560fe3b43a652be5a278fa61f67fcfdd7 (diff)
Fixed out of memory problems that caused torture test failures in tests
1021 and 1067.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 6da9c9ea0..41222f0ec 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2206,6 +2206,12 @@ CURLcode Curl_disconnect(struct connectdata *conn)
}
}
+ /* Cleanup possible redirect junk */
+ if(data->req.newurl) {
+ free(data->req.newurl);
+ data->req.newurl = NULL;
+ }
+
if(conn->handler->disconnect)
/* This is set if protocol-specific cleanups should be made */
conn->handler->disconnect(conn);
@@ -4483,7 +4489,7 @@ static CURLcode setup_conn(struct connectdata *conn,
}
#endif
- return CURLE_OK;
+ return result;
}
CURLcode Curl_connect(struct SessionHandle *data,