Don't test quite so many of them.
[openssl.git] / apps / crl2p7.c
index 73e62702ce7e8ed797900c8148ac53bfcac891bf..9c5f79f9f37988d0db709eda6eeaf82d44a1044a 100644 (file)
@@ -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);