From: Nils Larsch Date: Mon, 26 Feb 2007 18:32:53 +0000 (+0000) Subject: allow EVP_PKEY_CTX_free(NULL) X-Git-Tag: OpenSSL_0_9_8k^2~950 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=0d5ac5a738094fb171f01d20375a832e797dab2e;ds=sidebyside allow EVP_PKEY_CTX_free(NULL) --- diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 5b8000d691..500aad967b 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -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)