diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-17 22:54:45 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-17 22:54:45 +0000 |
commit | e4b09237672c3f715d4eaea29319d825c3e14494 (patch) | |
tree | b8a64d362747b98126fd7bb591b10d09f830ea33 /usr.bin/skeyinfo/skeyinfo.c | |
parent | f7af1085deb6d0912133129e632f7b34ce76d83d (diff) |
be careful to avoid null pointer deref
Diffstat (limited to 'usr.bin/skeyinfo/skeyinfo.c')
-rw-r--r-- | usr.bin/skeyinfo/skeyinfo.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <Todd.Miller@courtesan.com> @@ -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); } |