free NULL cleanup 7
[openssl.git] / crypto / ec / ec_ameth.c
index 6b34be38d7ee52fc33ae78804d15d74fbe72a1f2..0554c209e5799d060bcced5c88159b2b9fd373d9 100644 (file)
@@ -500,12 +500,9 @@ static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, int ktype)
  err:
     if (!ret)
         ECerr(EC_F_DO_EC_KEY_PRINT, reason);
-    if (pub_key)
-        BN_free(pub_key);
-    if (order)
-        BN_free(order);
-    if (ctx)
-        BN_CTX_free(ctx);
+    BN_free(pub_key);
+    BN_free(order);
+    BN_CTX_free(ctx);
     if (buffer != NULL)
         OPENSSL_free(buffer);
     return (ret);