diff options
author | 1996-10-15 12:29:27 +0000 | |
---|---|---|
committer | 1996-10-15 12:29:27 +0000 | |
commit | 555303e5d3e1276ef382053f43c739d74ebdeb52 (patch) | |
tree | af3453fe6c8c832f660ea332360170fbbb875c25 | |
parent | nqnfs code is for client+server; spotted by niklas (diff) | |
download | wireguard-openbsd-555303e5d3e1276ef382053f43c739d74ebdeb52.tar.xz wireguard-openbsd-555303e5d3e1276ef382053f43c739d74ebdeb52.zip |
fd leak spotted by bitblt
-rw-r--r-- | libexec/ftpd/ftpd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 9740c2789f6..fb032b5e642 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.21 1996/09/29 22:11:50 millert Exp $ */ +/* $OpenBSD: ftpd.c,v 1.22 1996/10/15 12:29:27 deraadt Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -1749,6 +1749,8 @@ passive() reply(530, "Please login with USER and PASS"); return; } + if (pdata >= 0) + close(pdata); pdata = socket(AF_INET, SOCK_STREAM, 0); if (pdata < 0) { perror_reply(425, "Can't open passive connection"); |