sudoers_cleanup: run the garbage collector at the end

This commit is contained in:
Todd C. Miller
2023-03-10 15:03:44 -07:00
parent c09aabecdc
commit cd5cd45336
2 changed files with 4 additions and 1 deletions

View File

@@ -1119,7 +1119,7 @@ sudoers_policy_close(int exit_status, int error_code)
/* Free sudoers sources, sudo_user and passwd/group caches. */
sudoers_cleanup();
/* command_info is freed by the g/c code. */
/* command_info was freed by the g/c code. */
command_info = NULL;
/* Free error message passed back to front-end, if any. */

View File

@@ -1872,6 +1872,9 @@ sudoers_cleanup(void)
sudo_freegrcache();
canon_path_free_cache();
/* Run garbage collector. */
sudoers_gc_run();
/* Clear globals */
list_pw = NULL;
saved_argv = NULL;