diff options
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index dc9ad211d89..21579c44ab1 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.180 2007/07/31 03:35:04 ray Exp $ */ +/* $OpenBSD: ftpd.c,v 1.181 2007/09/02 15:19:20 deraadt Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -70,7 +70,7 @@ static const char copyright[] = static const char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94"; #else static const char rcsid[] = - "$OpenBSD: ftpd.c,v 1.180 2007/07/31 03:35:04 ray Exp $"; + "$OpenBSD: ftpd.c,v 1.181 2007/09/02 15:19:20 deraadt Exp $"; #endif #endif /* not lint */ @@ -439,8 +439,8 @@ main(int argc, char *argv[]) for (res = res0; res; res = res->ai_next) n++; - fds = malloc(n * sizeof(int)); - pfds = malloc(n * sizeof(struct pollfd)); + fds = calloc(n, sizeof(int)); + pfds = calloc(n, sizeof(struct pollfd)); if (!fds || !pfds) { syslog(LOG_ERR, "%s", strerror(errno)); exit(1); |