]> err.no Git - yubikey-personalization.old/commitdiff
Only try to close the key if we got one...
authorRichard Levitte <levitte@lp.se>
Sun, 5 Oct 2008 08:00:13 +0000 (08:00 +0000)
committerRichard Levitte <levitte@lp.se>
Sun, 5 Oct 2008 08:00:13 +0000 (08:00 +0000)
ykpersonalize.c

index e2a2886bfaa7ca8f3c420074518536717b4fa3de..5fbfc361ba65f419cc0cc5d215d4311c906533f0 100644 (file)
@@ -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;
        }