aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-12-18 16:13:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-12-18 16:13:37 +0000
commit184ad46a27dc65a82faa2cda76fe91bcca3404cf (patch)
tree34cd8bc1c63d52318f6c686f0da4f47d96712fc4 /lib/ftp.c
parent74d35416a2ee4d0baa84e2b5daab2fc96dda5a58 (diff)
fixed accept() for memory debugging
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 705d090c8..93f1d3048 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -197,6 +197,8 @@ static CURLcode AllowServerConnect(struct UrlData *data,
getsockname(sock, (struct sockaddr *) &add, (int *)&size);
s=accept(sock, (struct sockaddr *) &add, (int *)&size);
+ sclose(sock); /* close the first socket */
+
if( -1 == s) {
/* DIE! */
failf(data, "Error accept()ing server connect");