summaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorIlya Lesokhin <ilyal@mellanox.com>2017-11-13 09:22:44 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-14 08:26:34 +0100
commit61ef6da622aa7b66bf92991bd272490eea6c712e (patch)
treeee84189e00cb00da682483070b9db7e7051d933f /net/tls
parentMerge branch 'bpf-improve-verifier-ARG_CONST_SIZE_OR_ZERO-semantics' (diff)
downloadlinux-61ef6da622aa7b66bf92991bd272490eea6c712e.tar.xz
linux-61ef6da622aa7b66bf92991bd272490eea6c712e.zip
tls: Use kzalloc for aead_request allocation
Use kzalloc for aead_request allocation as we don't set all the bits in the request. Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_sw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 7d80040a37b6..f00383a37622 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -219,7 +219,7 @@ static int tls_do_encryption(struct tls_context *tls_ctx,
struct aead_request *aead_req;
int rc;
- aead_req = kmalloc(req_size, flags);
+ aead_req = kzalloc(req_size, flags);
if (!aead_req)
return -ENOMEM;