aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/esp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/esp6.c')
-rw-r--r--net/ipv6/esp6.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index aa7f100dab35..3dcaac7a0972 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -305,12 +305,10 @@ static int esp6_init_state(struct xfrm_state *x)
305 if (x->encap) 305 if (x->encap)
306 goto error; 306 goto error;
307 307
308 esp = kmalloc(sizeof(*esp), GFP_KERNEL); 308 esp = kzalloc(sizeof(*esp), GFP_KERNEL);
309 if (esp == NULL) 309 if (esp == NULL)
310 return -ENOMEM; 310 return -ENOMEM;
311 311
312 memset(esp, 0, sizeof(*esp));
313
314 if (x->aalg) { 312 if (x->aalg) {
315 struct xfrm_algo_desc *aalg_desc; 313 struct xfrm_algo_desc *aalg_desc;
316 314