diff --git a/plugins/sudoers/tsgetusershell.c b/plugins/sudoers/tsgetusershell.c index 88eaa5b79a..a2e583de34 100644 --- a/plugins/sudoers/tsgetusershell.c +++ b/plugins/sudoers/tsgetusershell.c @@ -127,6 +127,8 @@ testsudoers_getusershell(void) if (current_shell == NULL) current_shell = read_shells(); + if (*current_shell == NULL) + debug_return_str(NULL); debug_return_str(*current_shell++); }