Use non-exiting allocators in the redblack tree and fix the fallout.

Also switch to non-exiting allocators in affected code blocks.
This commit is contained in:
Todd C. Miller
2015-05-27 09:51:54 -06:00
parent 46770c9588
commit 2bf454b74d
12 changed files with 194 additions and 77 deletions

View File

@@ -124,8 +124,10 @@ sudoers_policy_init(void *info, char * const envp[])
bindtextdomain("sudoers", LOCALEDIR);
sudo_setpwent();
sudo_setgrent();
if (sudo_setpwent() == -1 || sudo_setgrent() == -1) {
sudo_warnx(U_("unable to allocate memory"));
debug_return_int(-1);
}
/* Register fatal/fatalx callback. */
sudo_fatal_callback_register(sudoers_cleanup);