2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

display_lecture: just return if callback is NULL

This commit is contained in:
Todd C. Miller
2022-02-23 21:09:33 -07:00
parent 330b4e821b
commit b1fd1ec0fc

View File

@@ -232,7 +232,7 @@ done:
void
display_lecture(struct sudo_conv_callback *callback)
{
struct getpass_closure *closure = callback->closure;
struct getpass_closure *closure;
struct sudo_conv_message msg;
struct sudo_conv_reply repl;
char buf[BUFSIZ];
@@ -241,6 +241,9 @@ display_lecture(struct sudo_conv_callback *callback)
int fd;
debug_decl(lecture, SUDOERS_DEBUG_AUTH);
if (callback == NULL || (closure = callback->closure) == NULL)
debug_return;
if (closure->lectured)
debug_return;