aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/api.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 34e02caffc2a..80bba637fba7 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -179,12 +179,10 @@ struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)
179 goto out; 179 goto out;
180 180
181 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, flags); 181 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, flags);
182 tfm = kmalloc(tfm_size, GFP_KERNEL); 182 tfm = kzalloc(tfm_size, GFP_KERNEL);
183 if (tfm == NULL) 183 if (tfm == NULL)
184 goto out_put; 184 goto out_put;
185 185
186 memset(tfm, 0, tfm_size);
187
188 tfm->__crt_alg = alg; 186 tfm->__crt_alg = alg;
189 187
190 if (crypto_init_flags(tfm, flags)) 188 if (crypto_init_flags(tfm, flags))