From ad3c92f7d22c42ee71551b691f63e60d3b301da1 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Tue, 17 Mar 2015 15:00:54 +0100 Subject: [PATCH] break out after error --- tool/yubico-piv-tool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tool/yubico-piv-tool.c b/tool/yubico-piv-tool.c index 3e50f5f..72ae331 100644 --- a/tool/yubico-piv-tool.c +++ b/tool/yubico-piv-tool.c @@ -1239,6 +1239,7 @@ static void print_cert_info(ykpiv_state *state, enum enum_slot slot, const EVP_M EVP_PKEY *key = X509_get_pubkey(x509); if(!key) { fprintf(output, "Parse error.\n"); + goto cert_out; } fprintf(output, "\n\tAlgorithm:\t"); type = EVP_PKEY_type(key->type);