allow EVP_PKEY_CTX_free(NULL)

This commit is contained in:
Nils Larsch 2007-02-26 18:32:53 +00:00
parent c209a35820
commit 0d5ac5a738

View file

@ -289,6 +289,8 @@ int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth)
void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx)
{
if (ctx == NULL)
return;
if (ctx->pmeth && ctx->pmeth->cleanup)
ctx->pmeth->cleanup(ctx);
if (ctx->pkey)