aboutsummaryrefslogtreecommitdiffstats
path: root/engines/ccgost/gost94_keyx.c
diff options
context:
space:
mode:
Diffstat (limited to 'engines/ccgost/gost94_keyx.c')
-rw-r--r--engines/ccgost/gost94_keyx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/ccgost/gost94_keyx.c b/engines/ccgost/gost94_keyx.c
index ce57f17cbf32..3532bfff3e96 100644
--- a/engines/ccgost/gost94_keyx.c
+++ b/engines/ccgost/gost94_keyx.c
@@ -126,6 +126,8 @@ int pkey_GOST94cp_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out,
key_is_ephemeral = 1;
if (out) {
mykey = EVP_PKEY_new();
+ if (!mykey)
+ goto memerr;
EVP_PKEY_assign(mykey, EVP_PKEY_base_id(pubk), DSA_new());
EVP_PKEY_copy_parameters(mykey, pubk);
if (!gost_sign_keygen(EVP_PKEY_get0(mykey))) {