Added NULL check to BN_clear() & BN_CTX_end()
[openssl.git] / crypto / ec / ecp_nistz256.c
index c0772ca2fe5189216d71bf1308a7d77bfcd7654b..6a64bc4f2a25882a48991aae374e1a7a2e8eafbb 100644 (file)
@@ -888,8 +888,7 @@ __owur static int ecp_nistz256_mult_precompute(EC_GROUP *group, BN_CTX *ctx)
     ret = 1;
 
  err:
-    if (ctx != NULL)
-        BN_CTX_end(ctx);
+    BN_CTX_end(ctx);
     BN_CTX_free(new_ctx);
 
     EC_nistz256_pre_comp_free(pre_comp);