mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
sudoers_cleanup: free cached environment before running g/c.
Avoids a double free in fuzz_policy.
This commit is contained in:
@@ -498,13 +498,9 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
sudoers_policy.close(0, 0);
|
||||
else
|
||||
sudoers_cleanup();
|
||||
|
||||
/* Call a second time to free old env pointer. */
|
||||
env_init(NULL);
|
||||
}
|
||||
|
||||
sudoers_policy.deregister_hooks(SUDO_API_VERSION, fuzz_hook_stub);
|
||||
sudoers_gc_run();
|
||||
|
||||
free_dynamic_array(&plugin_args);
|
||||
free_dynamic_array(&settings);
|
||||
|
Reference in New Issue
Block a user