Don't allow cmd_lookup_client to test clients without a session.

pull/1/head
Nicholas Marriott 2009-10-14 09:29:10 +00:00
parent ad566a86de
commit adad557499
1 changed files with 2 additions and 1 deletions

3
cmd.c
View File

@ -458,7 +458,8 @@ cmd_lookup_client(const char *name)
u_int i;
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
if ((c = ARRAY_ITEM(&clients, i)) == NULL)
c = ARRAY_ITEM(&clients, i);
if (c == NULL || c->session == NULL)
continue;
path = c->tty.path;