author: David S. Miller <davem@davemloft.net> 2020-07-25 17:49:04 -0700
committer: David S. Miller <davem@davemloft.net> 2020-07-25 17:49:04 -0700
commit: a57066b1a01977a646145f4ce8dfb4538b08368a
parent: dfecd3e00cd32b2a6d1cfdb30b513dd42575ada3
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 0 deletions
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index d7f43d4ea925..e5fae4e838c0 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -119,6 +119,7 @@ static int software_key_query(const struct kernel_pkey_params *params,
if (IS_ERR(tfm))
return PTR_ERR(tfm);
+ ret = -ENOMEM;
key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen,
GFP_KERNEL);
if (!key)