summaryrefslogtreecommitdiff
path: root/libfetch/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfetch/ftp.c')
-rw-r--r--libfetch/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfetch/ftp.c b/libfetch/ftp.c
index 77790aa..14323dc 100644
--- a/libfetch/ftp.c
+++ b/libfetch/ftp.c
@@ -692,7 +692,7 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file, const char *op_ar
retry_mode:
/* open data socket */
- if ((sd = socket(u.ss.ss_family, SOCK_STREAM, IPPROTO_TCP)) == -1) {
+ if ((sd = socket(u.ss.ss_family, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP)) == -1) {
fetch_syserr();
return (NULL);
}