From: Richard Levitte Date: Sun, 5 Oct 2008 08:00:13 +0000 (+0000) Subject: Only try to close the key if we got one... X-Git-Tag: yubikey-personalisation_1.3.5-1~4^2~196 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be6a25d39f00251cef05236709b1dbb3ebc29522;p=yubikey-personalization.old Only try to close the key if we got one... --- diff --git a/ykpersonalize.c b/ykpersonalize.c index e2a2886..5fbfc36 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -220,7 +220,8 @@ main(int argc, char **argv) fclose(inf); if (outf) fclose(outf); - if (!yk_close_key(yk)) { + + if (yk && !yk_close_key(yk)) { report_yk_error(); exit_code = 2; }