summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/scard.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/scard.c b/usr.bin/ssh/scard.c
index 9f22fdf39fe..8c53c66df49 100644
--- a/usr.bin/ssh/scard.c
+++ b/usr.bin/ssh/scard.c
@@ -24,7 +24,7 @@
#ifdef SMARTCARD
#include "includes.h"
-RCSID("$OpenBSD: scard.c,v 1.9 2001/07/31 08:41:10 jakob Exp $");
+RCSID("$OpenBSD: scard.c,v 1.10 2001/07/31 12:53:34 jakob Exp $");
#include <openssl/engine.h>
#include <sectok.h>
@@ -64,6 +64,7 @@ sc_open(void)
if (! sectok_cardpresent(sc_fd)) {
debug("smartcard in reader %d not present, skipping",
sc_reader_num);
+ sc_close();
return SCARD_ERROR_NOCARD;
}
if (sectok_reset(sc_fd, 0, NULL, &sw) <= 0) {