Remove a bad 'goto end' and a few superfluous ones in apps/lib/apps.c
[openssl.git] / demos / smime / smdec.c
index 6814d5199b791d417dde96eb01b801c06df3a82e..debcedd5e866cfe9772f7c0dec27ea03f0f799fc 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
 /* Simple S/MIME signing example */
 #include <openssl/pem.h>
 #include <openssl/pkcs7.h>
@@ -53,25 +62,16 @@ int main(int argc, char **argv)
     ret = 0;
 
  err:
-
     if (ret) {
         fprintf(stderr, "Error Signing Data\n");
         ERR_print_errors_fp(stderr);
     }
-
-    if (p7)
-        PKCS7_free(p7);
-    if (rcert)
-        X509_free(rcert);
-    if (rkey)
-        EVP_PKEY_free(rkey);
-
-    if (in)
-        BIO_free(in);
-    if (out)
-        BIO_free(out);
-    if (tbio)
-        BIO_free(tbio);
+    PKCS7_free(p7);
+    X509_free(rcert);
+    EVP_PKEY_free(rkey);
+    BIO_free(in);
+    BIO_free(out);
+    BIO_free(tbio);
 
     return ret;