From: Ilya Lesokhin Date: Mon, 13 Nov 2017 08:22:44 +0000 (+0200) Subject: tls: Use kzalloc for aead_request allocation X-Git-Tag: v4.15-rc1~108^2~34^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61ef6da622aa7b66bf92991bd272490eea6c712e;p=thirdparty%2Flinux.git 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 Signed-off-by: David S. Miller --- diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 7d80040a37b6d..f00383a376220 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;