diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-15 12:29:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-15 12:29:28 +0000 |
commit | f8b0ec549f548dba525e08c23006798cd506247e (patch) | |
tree | 05b0cc2a8319d9548037bc9e173e15962df58893 | |
parent | 946c84371528b181cc425ce11d5b8767170f086d (diff) |
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"); |