X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=apps%2Fcrl2p7.c;h=cb2461e2e0a339381b49b063e204a6b889f9af2b;hp=73e62702ce7e8ed797900c8148ac53bfcac891bf;hb=16afd71c1dbafad398fc0c40e90b06acccca29de;hpb=846e33c729311169d9c988ceba29484b3783f244 diff --git a/apps/crl2p7.c b/apps/crl2p7.c index 73e62702ce..cb2461e2e0 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -25,7 +25,7 @@ typedef enum OPTION_choice { OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_NOCRL, OPT_CERTFILE } OPTION_CHOICE; -OPTIONS crl2pkcs7_options[] = { +const OPTIONS crl2pkcs7_options[] = { {"help", OPT_HELP, '-', "Display this summary"}, {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"}, {"outform", OPT_OUTFORM, 'F', "Output format - DER or PEM"}, @@ -84,10 +84,8 @@ int crl2pkcs7_main(int argc, char **argv) if ((certflst == NULL) && (certflst = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - if (!sk_OPENSSL_STRING_push(certflst, opt_arg())) { - sk_OPENSSL_STRING_free(certflst); + if (!sk_OPENSSL_STRING_push(certflst, opt_arg())) goto end; - } break; } } @@ -143,8 +141,6 @@ int crl2pkcs7_main(int argc, char **argv) } } - sk_OPENSSL_STRING_free(certflst); - out = bio_open_default(outfile, 'w', outformat); if (out == NULL) goto end; @@ -160,6 +156,7 @@ int crl2pkcs7_main(int argc, char **argv) } ret = 0; end: + sk_OPENSSL_STRING_free(certflst); BIO_free(in); BIO_free_all(out); PKCS7_free(p7);