diff options
Diffstat (limited to 'login-utils/sulogin.c')
-rw-r--r-- | login-utils/sulogin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 8dc2b639d..5b8712bfe 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -827,8 +827,7 @@ static void usage(FILE *out) int main(int argc, char **argv) { - LIST_HEAD(consoles); - struct list_head *ptr; + struct list_head *ptr, consoles; struct console *con; char *tty = NULL; struct passwd *pwd; @@ -849,6 +848,8 @@ int main(int argc, char **argv) { NULL, 0, 0, 0 } }; + INIT_LIST_HEAD(&consoles); + /* * If we are init we need to set up a own session. */ |