From f34e4eb6c730fa38640aeef5f6801035caaba460 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Fri, 22 Mar 2002 03:08:30 +0000 Subject: - markus@cvs.openbsd.org 2002/03/19 15:31:47 [auth.c] check for NULL; from provos@ --- auth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'auth.c') diff --git a/auth.c b/auth.c index f368faf2..a9f981d1 100644 --- a/auth.c +++ b/auth.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth.c,v 1.40 2002/03/19 14:27:39 markus Exp $"); +RCSID("$OpenBSD: auth.c,v 1.41 2002/03/19 15:31:47 markus Exp $"); #ifdef HAVE_LOGIN_H #include @@ -470,5 +470,7 @@ getpwnamallow(const char *user) auth_close(as); #endif #endif - return (pwcopy(pw)); + if (pw != NULL) + return (pwcopy(pw)); + return (NULL); } -- cgit v1.2.3