mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Avoid calling sudoers_policy_exec_setup() on error.
We only want to pass the execution environment back for commands that are accepted or rejected. Also avoid potentially freeing the wrong pointer when garbage collection is enabled.
This commit is contained in:
@@ -816,7 +816,6 @@ sudoers_policy_exec_setup(char *argv[], char *envp[], mode_t cmnd_umask,
|
||||
#endif /* HAVE_SELINUX */
|
||||
|
||||
/* Free on exit; they are not available in the close function. */
|
||||
sudoers_gc_add(GC_VECTOR, argv);
|
||||
sudoers_gc_add(GC_VECTOR, envp);
|
||||
sudoers_gc_add(GC_VECTOR, command_info);
|
||||
|
||||
|
Reference in New Issue
Block a user