fix error found by coverity: check if ctx is != NULL before calling BN_CTX_end()

This commit is contained in:
Nils Larsch
2006-03-13 23:12:08 +00:00
parent 5586a71a6e
commit b7a80146f4
5 changed files with 16 additions and 7 deletions

View 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)