aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-12-11 09:32:58 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-12-11 09:32:58 +0000
commit88c8d72a214864952b6d1c2347b6c3f5b7d69e84 (patch)
tree965d76e2bd0a815d0ec6754f7d2f7db23d8f6a70 /lib/url.c
parentcf99fed17a99d11a7c4e93855a97402b669afb7d (diff)
Alexey Simak found out that when doing FTP with the multi interface and
something went wrong like it got a bad response code back from the server, libcurl would leak memory. Added test case 538 to verify the fix. I also noted that the connection would get cached in that case, which doesn't make sense since it cannot be re-use when the authentication has failed. I fixed that issue too at the same time, and also that the path would be "remembered" in vain for cases where the connection was about to get closed.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/url.c b/lib/url.c
index a028857e8..9a3c68d0b 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2171,10 +2171,7 @@ static void
ConnectionDone(struct connectdata *conn)
{
conn->inuse = FALSE;
- conn->data = NULL;
-
- if (conn->send_pipe == 0 &&
- conn->recv_pipe == 0)
+ if (!conn->send_pipe && !conn->recv_pipe)
conn->is_in_pipeline = FALSE;
}
@@ -3071,7 +3068,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
conn->port = port;
conn->remote_port = (unsigned short)port;
- conn->protocol |= PROT_FTP|PROT_CLOSEACTION;
+ conn->protocol |= PROT_FTP;
if(data->change.proxy &&
*data->change.proxy &&