aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/esp4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/esp4.c')
-rw-r--r--net/ipv4/esp4.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index b31ffc5053d2..1b5a09d1b90b 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -343,22 +343,14 @@ static void esp_destroy(struct xfrm_state *x)
343 if (!esp) 343 if (!esp)
344 return; 344 return;
345 345
346 if (esp->conf.tfm) { 346 crypto_free_tfm(esp->conf.tfm);
347 crypto_free_tfm(esp->conf.tfm); 347 esp->conf.tfm = NULL;
348 esp->conf.tfm = NULL; 348 kfree(esp->conf.ivec);
349 } 349 esp->conf.ivec = NULL;
350 if (esp->conf.ivec) { 350 crypto_free_tfm(esp->auth.tfm);
351 kfree(esp->conf.ivec); 351 esp->auth.tfm = NULL;
352 esp->conf.ivec = NULL; 352 kfree(esp->auth.work_icv);
353 } 353 esp->auth.work_icv = NULL;
354 if (esp->auth.tfm) {
355 crypto_free_tfm(esp->auth.tfm);
356 esp->auth.tfm = NULL;
357 }
358 if (esp->auth.work_icv) {
359 kfree(esp->auth.work_icv);
360 esp->auth.work_icv = NULL;
361 }
362 kfree(esp); 354 kfree(esp);
363} 355}
364 356