diff --git a/plugins/sudoers/log_client.c b/plugins/sudoers/log_client.c index 818218a3d..c926ddbe7 100644 --- a/plugins/sudoers/log_client.c +++ b/plugins/sudoers/log_client.c @@ -909,7 +909,9 @@ fmt_info_messages(struct client_closure *closure, struct eventlog *evlog, fill_str("submithost", evlog->submithost); /* TODO - submituid */ fill_str("submituser", evlog->submituser); - fill_str("ttyname", evlog->ttyname); + if (evlog->ttyname != NULL) { + fill_str("ttyname", evlog->ttyname); + } /* Free unused structs. */ while (info_msgs_size > n)