apply fixes from the cvs head

This commit is contained in:
Nils Larsch 2006-03-14 09:07:06 +00:00
parent e8518f847e
commit e0fe7abeec
2 changed files with 7 additions and 3 deletions

View file

@ -213,8 +213,11 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
ret=BN_bn2bin(tmp,key);
err:
BN_CTX_end(ctx);
BN_CTX_free(ctx);
if (ctx != NULL)
{
BN_CTX_end(ctx);
BN_CTX_free(ctx);
}
return(ret);
}

View file

@ -184,7 +184,8 @@ err:
RSAerr(RSA_F_RSA_GENERATE_KEY,ERR_LIB_BN);
ok=0;
}
BN_CTX_end(ctx);
if (ctx != NULL)
BN_CTX_end(ctx);
BN_CTX_free(ctx);
BN_CTX_free(ctx2);