Five-letter patch that fixes a use-after-free and possible list

corruption.  Don't know how far back this bug goes.  Caught and
diagnosed on an Ubuntu system where it manifested as a segfault.
This commit is contained in:
Emil Mikulic 2008-08-02 03:51:11 +00:00
parent f5c051aad5
commit 820b5c2e3b

View File

@ -2341,7 +2341,8 @@ static void httpd_poll(void)
/* poll connections that select() says need attention */
if (FD_ISSET(sockin, &recv_set)) accept_connection();
LIST_FOREACH(conn, &connlist, entries) {
LIST_FOREACH_SAFE(conn, &connlist, entries, next)
{
switch (conn->state)
{
case RECV_REQUEST: