Only store the first log id received from the server.
Plugs a small memory leak in intercept mode if the log server sends the log ID again for sub-commands.
This commit is contained in:
@@ -1553,8 +1553,10 @@ handle_log_id(char *id, struct client_closure *closure)
|
||||
debug_decl(handle_log_id, SUDOERS_DEBUG_UTIL);
|
||||
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO, "%s: remote log ID: %s", __func__, id);
|
||||
if ((closure->iolog_id = strdup(id)) == NULL)
|
||||
sudo_fatal(NULL);
|
||||
if (closure->iolog_id != NULL) {
|
||||
if ((closure->iolog_id = strdup(id)) == NULL)
|
||||
sudo_fatal(NULL);
|
||||
}
|
||||
debug_return_bool(true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user