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

log_server_alert: plug potential memory leak

Coverity CID 249328
This commit is contained in:
Todd C. Miller
2022-02-15 19:50:55 -07:00
parent 72961fe433
commit f01b044010

View File

@@ -189,8 +189,10 @@ log_server_alert(struct eventlog *evlog, struct timespec *now,
if (ISSET(sudo_mode, MODE_POLICY_INTERCEPTED)) {
/* Older servers don't support multiple commands per session. */
if (!client_closure->subcommands)
debug_return_bool(true);
if (!client_closure->subcommands) {
ret = true;
goto done;
}
/* Use existing client closure. */
if (fmt_reject_message(client_closure, evlog)) {