Added NULL check to BN_clear() & BN_CTX_end()
[openssl.git] / crypto / ec / ec_lib.c
index 2623b5377fa4fc595982c62e9055d73b56ae9801..798382ac293eaa542bc3752fb9842839da53cad6 100644 (file)
@@ -1079,8 +1079,7 @@ static int ec_field_inverse_mod_ord(const EC_GROUP *group, BIGNUM *r,
     ret = 1;
 
  err:
-    if (ctx != NULL)
-        BN_CTX_end(ctx);
+    BN_CTX_end(ctx);
     BN_CTX_free(new_ctx);
     return ret;
 }