From: Wilfried Göesgens Date: Fri, 19 Feb 2010 18:36:55 +0000 (+0000) Subject: * protect access to client_sock here too. X-Git-Tag: v7.86~412 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=35efc2f567052c69cfdedaafdf3082104d354bef;p=citadel.git * protect access to client_sock here too. --- diff --git a/citadel/sysdep.c b/citadel/sysdep.c index c39d85ba6..416fc7b89 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -1080,8 +1080,11 @@ do_select: force_purge = 0; */ begin_critical_section(S_SESSION_TABLE); for (ptr = ContextList; ptr != NULL; ptr = ptr->next) { - if ( (FD_ISSET(ptr->client_socket, &readfds)) - && (ptr->state == CON_IDLE) ) { + int checkfd = ptr->client_socket; + if ((checkfd != -1) && + (FD_ISSET(checkfd, &readfds)) && + (ptr->state == CON_IDLE) ) + { ptr->input_waiting = 1; if (!bind_me) { bind_me = ptr; /* I choose you! */