This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
athttp memory leak if NFILES < MAXSOCKETS
- From: Tad <ecos_removethispart at ds3switch dot com>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Tue, 12 Jun 2007 03:37:54 -0800
- Subject: athttp memory leak if NFILES < MAXSOCKETS
athttpd\current\include:http.h needs
-- socket_entry sockets[CYGNUM_FILEIO_NFILE];
++ socket_entry sockets[CYGPKG_NET_MAXSOCKETS];
and
athttpd\current\src:socket.c needs
-- for (i = 0; i < CYGNUM_FILEIO_NFILE; i++)
++ for (i = 0; i < CYGPKG_NET_MAXSOCKETS; i++)
{
httpstate.sockets[i].descriptor = 0;
httpstate.sockets[i].timestamp = (time_t)0;
}
because the rest of socket.c indexes sockets[] up to MAXSOCKETS.