Plug memory leak in error path when sudoers cannot be opened.

This commit is contained in:
Todd C. Miller
2021-07-29 15:26:04 -06:00
parent 1032fca5b8
commit 8b009f62eb

View File

@@ -1015,6 +1015,7 @@ new_sudoers(const char *path, bool doedit)
bad:
if (entry->fd != -1)
close(entry->fd);
free(entry->path);
free(entry);
debug_return_ptr(NULL);
}