More size_tification.
[openssl.git] / crypto / ec / ec_check.c
index f22c5641a8177dc8bb3317a60a424230e00a8a12..0e316b4b3ff075234fcd62791d2995442710be01 100644 (file)
@@ -113,7 +113,8 @@ int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx)
        ret = 1;
 
 err:
-       BN_CTX_end(ctx);
+       if (ctx != NULL)
+               BN_CTX_end(ctx);
        if (new_ctx != NULL)
                BN_CTX_free(new_ctx);
        if (point)