-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a helper create_log_context() to initialize a krb5_context's kdblog_context field, setting ulogfd to -1. Use it in ulog_set_role() and ulog_map(). In ulog_fini(), release ulogfd if it is not -1. In ulog_map(), add a cleanup label and use it to finalize the log context on failure, so that we don't (trivially) leak the mapped ulog. To reduce the number of "retval = errno;" statements required for this change, make extend_file_to() return a krb5_error_code. The ulog leak on error was reported by Bean Zhang. ticket: 8707
- Loading branch information
1 parent
396c736
commit 7aff251
Showing
2 changed files
with
68 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters