mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
Plug memory leak when log_subcmds is enabled.
This commit is contained in:
parent
cb7b1dd89c
commit
31dad6b179
@ -450,10 +450,11 @@ intercept_check_policy(const char *command, int argc, char **argv, int envc,
|
||||
goto oom;
|
||||
|
||||
/* Rebuild command_info[] with new command and runcwd. */
|
||||
command_info = update_command_info(closure->details->info,
|
||||
command_info_copy = update_command_info(closure->details->info,
|
||||
command, runcwd, NULL, closure);
|
||||
if (command_info == NULL)
|
||||
if (command_info_copy == NULL)
|
||||
goto oom;
|
||||
command_info = command_info_copy;
|
||||
closure->state = POLICY_ACCEPT;
|
||||
run_argv = argv;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user