]> err.no Git - yubikey-personalization/commitdiff
Only try to close the key if we got one...
authorlevitte <levitte@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Sun, 5 Oct 2008 08:00:13 +0000 (08:00 +0000)
committerlevitte <levitte@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Sun, 5 Oct 2008 08:00:13 +0000 (08:00 +0000)
git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@30 b62f149e-849f-11dd-9899-c7ba65f7c4c7

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;
        }