Clear pollfds first.

pull/1/head
Nicholas Marriott 2009-03-27 08:46:02 +00:00
parent 12bb7436c3
commit 52fb9ca250
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server.c,v 1.126 2009-03-05 20:24:41 nicm Exp $ */
/* $Id: server.c,v 1.127 2009-03-27 08:46:02 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -249,6 +249,7 @@ server_main(const char *srv_path, int srv_fd)
}
nfds += ARRAY_LENGTH(&clients) * 2;
pfds = xrealloc(pfds, nfds, sizeof *pfds);
memset(pfds, 0, nfds * sizeof *pfds);
pfd = pfds;
/* Fill server socket. */