From e4b09237672c3f715d4eaea29319d825c3e14494 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 17 Jun 2001 22:54:45 +0000 Subject: be careful to avoid null pointer deref --- usr.bin/skeyinfo/skeyinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/skeyinfo/skeyinfo.c') diff --git a/usr.bin/skeyinfo/skeyinfo.c b/usr.bin/skeyinfo/skeyinfo.c index fbf150aaac6..80050068a69 100644 --- a/usr.bin/skeyinfo/skeyinfo.c +++ b/usr.bin/skeyinfo/skeyinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: skeyinfo.c,v 1.7 2001/06/17 22:44:51 millert Exp $ */ +/* $OpenBSD: skeyinfo.c,v 1.8 2001/06/17 22:54:44 millert Exp $ */ /* * Copyright (c) 1997, 2001 Todd C. Miller @@ -82,7 +82,8 @@ main(argc, argv) as = auth_userchallenge(name, "skey", NULL, &challenge); if (as == NULL || challenge == NULL) { - auth_close(as); + if (as) + auth_close(as); errx(1, "unable to retrieve S/Key challenge for %s", name); } -- cgit v1.2.3