diff options
Diffstat (limited to 'net/ipv4/esp4.c')
-rw-r--r-- | net/ipv4/esp4.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 4e112738b3fa..fc2f8ce441de 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -316,12 +316,10 @@ static int esp_init_state(struct xfrm_state *x) | |||
316 | if (x->ealg == NULL) | 316 | if (x->ealg == NULL) |
317 | goto error; | 317 | goto error; |
318 | 318 | ||
319 | esp = kmalloc(sizeof(*esp), GFP_KERNEL); | 319 | esp = kzalloc(sizeof(*esp), GFP_KERNEL); |
320 | if (esp == NULL) | 320 | if (esp == NULL) |
321 | return -ENOMEM; | 321 | return -ENOMEM; |
322 | 322 | ||
323 | memset(esp, 0, sizeof(*esp)); | ||
324 | |||
325 | if (x->aalg) { | 323 | if (x->aalg) { |
326 | struct xfrm_algo_desc *aalg_desc; | 324 | struct xfrm_algo_desc *aalg_desc; |
327 | 325 | ||