Restore the NULL check that was removed in upstream r913. It is not

unreasonable to call pam_end() with a NULL pamh in error handling code.

Reported by:	rwatson
This commit is contained in:
Dag-Erling Smørgrav 2017-03-24 14:45:58 +00:00
parent 7e31684ea4
commit e4deb071bd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315909
2 changed files with 3 additions and 2 deletions

View file

@ -72,8 +72,7 @@ pam_close_session(pam_handle_t *_pamh,
int
pam_end(pam_handle_t *_pamh,
int _status)
OPENPAM_NONNULL((1));
int _status);
int
pam_get_data(const pam_handle_t *_pamh,

View file

@ -60,6 +60,8 @@ pam_end(pam_handle_t *pamh,
int i;
ENTER();
if (pamh == NULL)
RETURNC(PAM_SYSTEM_ERR);
/* clear module data */
while ((dp = pamh->module_data) != NULL) {