Ugh. Another inner loop variable reuse bug.

This commit is contained in:
Nicholas Marriott 2009-01-29 20:13:12 +00:00
parent b4076865bb
commit 871f57cb63

View File

@ -1,4 +1,4 @@
/* $Id: server.c,v 1.115 2009-01-28 19:52:21 nicm Exp $ */ /* $Id: server.c,v 1.116 2009-01-29 20:13:12 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -337,12 +337,12 @@ server_shutdown(void)
{ {
struct session *s; struct session *s;
struct client *c; struct client *c;
u_int i; u_int i, j;
for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
s = ARRAY_ITEM(&sessions, i); s = ARRAY_ITEM(&sessions, i);
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { for (j = 0; j < ARRAY_LENGTH(&clients); j++) {
c = ARRAY_ITEM(&clients, i); c = ARRAY_ITEM(&clients, j);
if (c != NULL && c->session == s) { if (c != NULL && c->session == s) {
s = NULL; s = NULL;
break; break;