summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/common.c
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2002-09-17 05:54:33 +0000
committerfenner <fenner@FreeBSD.org>2002-09-17 05:54:33 +0000
commitdd87f608a38d2d4d0afacbd9c481605cf68b1565 (patch)
treea41fa6f3686892d2962027e74dfb5742f3f39fc4 /lib/libfetch/common.c
parent024665d45e967fede40c4d15da08470800f4bd63 (diff)
downloadFreeBSD-src-dd87f608a38d2d4d0afacbd9c481605cf68b1565.zip
FreeBSD-src-dd87f608a38d2d4d0afacbd9c481605cf68b1565.tar.gz
Make _fetch_connect() always set the error code.
Tell ftp that _fetch_connect() always sets the error code (http already knew)
Diffstat (limited to 'lib/libfetch/common.c')
-rw-r--r--lib/libfetch/common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index cb69ec0..4b2e6ea 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -271,8 +271,10 @@ _fetch_connect(const char *host, int port, int af, int verbose)
return (NULL);
}
- if ((conn = _fetch_reopen(sd)) == NULL)
+ if ((conn = _fetch_reopen(sd)) == NULL) {
+ _fetch_syserr();
close(sd);
+ }
return (conn);
}
OpenPOWER on IntegriCloud