Free EVP ctx pkey

This commit is contained in:
Tesfa Mael
2019-12-18 17:39:53 -08:00
parent 3f13b49fa3
commit 48e59eaeb1
2 changed files with 6 additions and 2 deletions

View File

@@ -901,6 +901,8 @@ int wolfSSL_EVP_PKEY_CTX_free(WOLFSSL_EVP_PKEY_CTX *ctx)
{
if (ctx == NULL) return 0;
WOLFSSL_ENTER("EVP_PKEY_CTX_free");
if (ctx->pkey != NULL)
wolfSSL_EVP_PKEY_free(ctx->pkey);
XFREE(ctx, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
return WOLFSSL_SUCCESS;
}