diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-10-14 13:22:24 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-10-14 13:22:24 +0000 |
commit | f8f2421ac36dbcb8facdb30b25b837d81c6725ef (patch) | |
tree | 655680ed1484f348c3ad25e607ad04e3d4ec6718 /cmd.c | |
parent | 9e6d1b24c89928c2935e4c1e5263899cef3a0649 (diff) |
Don't let cmd_lookup_client find clients w/o a session.
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: cmd.c,v 1.123 2009-10-12 00:35:08 tcunha Exp $ */ +/* $Id: cmd.c,v 1.124 2009-10-14 13:22:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -457,7 +457,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; |