mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
For plugin API 1.15 and up, always call the plugin close function.
Previously, it was only called when a command was run (including sudoedit). Now, plugin operations list, validate, invalidate, and show_version are also closed.
This commit is contained in:
@@ -869,10 +869,14 @@ sudoers_policy_close(int exit_status, int error_code)
|
||||
|
||||
/* Free remaining references to password and group entries. */
|
||||
/* XXX - move cleanup to function in sudoers.c */
|
||||
sudo_pw_delref(sudo_user.pw);
|
||||
sudo_user.pw = NULL;
|
||||
sudo_pw_delref(runas_pw);
|
||||
runas_pw = NULL;
|
||||
if (sudo_user.pw != NULL) {
|
||||
sudo_pw_delref(sudo_user.pw);
|
||||
sudo_user.pw = NULL;
|
||||
}
|
||||
if (runas_pw != NULL) {
|
||||
sudo_pw_delref(runas_pw);
|
||||
runas_pw = NULL;
|
||||
}
|
||||
if (runas_gr != NULL) {
|
||||
sudo_gr_delref(runas_gr);
|
||||
runas_gr = NULL;
|
||||
|
Reference in New Issue
Block a user