Fix error checking and memory leaks in NISTZ256 precomputation.
[openssl.git] / apps / gendh.c
index bbeba067148cbd3eb3902da3654533735645988f..904bcf3a945a956b3a4a9fd36e53942efbeff226 100644 (file)
@@ -210,10 +210,8 @@ int MAIN(int argc, char **argv)
  end:
     if (ret != 0)
         ERR_print_errors(bio_err);
  end:
     if (ret != 0)
         ERR_print_errors(bio_err);
-    if (out != NULL)
-        BIO_free_all(out);
-    if (dh != NULL)
-        DH_free(dh);
+    BIO_free_all(out);
+    DH_free(dh);
     if (cb != NULL)
         BN_GENCB_free(cb);
     apps_shutdown();
     if (cb != NULL)
         BN_GENCB_free(cb);
     apps_shutdown();