From 5401918ec5c01d0e5ce0213ccfba3b3425337185 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Tue, 19 Mar 2002 15:31:48 +0000 Subject: check for NULL; from provos@ --- usr.bin/ssh/auth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh') diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c index 028de4801b4..125c16ee8c9 100644 --- a/usr.bin/ssh/auth.c +++ b/usr.bin/ssh/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 $"); #include @@ -418,5 +418,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