mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +00:00
sudoers_cleanup: free cached environment before running g/c.
Avoids a double free in fuzz_policy.
This commit is contained in:
@@ -1872,6 +1872,9 @@ sudoers_cleanup(void)
|
||||
sudo_freegrcache();
|
||||
canon_path_free_cache();
|
||||
|
||||
/* We must free the cached environment before running g/c. */
|
||||
env_init(NULL);
|
||||
|
||||
/* Run garbage collector. */
|
||||
sudoers_gc_run();
|
||||
|
||||
|
Reference in New Issue
Block a user