aboutsummaryrefslogtreecommitdiff
path: root/contrib/openpam/lib
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2017-03-24 14:45:58 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2017-03-24 14:45:58 +0000
commite4deb071bdf0b1c5e840a38d268e178539c763e3 (patch)
tree206d612ef7947c737e95101504d9ccb91092dbb6 /contrib/openpam/lib
parent7e31684ea4499158704dac19aba823c77f428285 (diff)
downloadsrc-e4deb071bdf0b1c5e840a38d268e178539c763e3.tar.gz
src-e4deb071bdf0b1c5e840a38d268e178539c763e3.zip
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
Notes
Notes: svn path=/head/; revision=315909
Diffstat (limited to 'contrib/openpam/lib')
-rw-r--r--contrib/openpam/lib/libpam/pam_end.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/openpam/lib/libpam/pam_end.c b/contrib/openpam/lib/libpam/pam_end.c
index c855b59c4885..d1b3ad589845 100644
--- a/contrib/openpam/lib/libpam/pam_end.c
+++ b/contrib/openpam/lib/libpam/pam_end.c
@@ -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) {