Commit 12332a86 authored by James Morris's avatar James Morris Committed by David S. Miller

[IPSEC]: AH/ESP forget to free private structs.

parent 58c93291
...@@ -314,6 +314,7 @@ static void ah_destroy(struct xfrm_state *x) ...@@ -314,6 +314,7 @@ static void ah_destroy(struct xfrm_state *x)
crypto_free_tfm(ahp->tfm); crypto_free_tfm(ahp->tfm);
ahp->tfm = NULL; ahp->tfm = NULL;
} }
kfree(ahp);
} }
......
...@@ -452,6 +452,7 @@ void esp_destroy(struct xfrm_state *x) ...@@ -452,6 +452,7 @@ void esp_destroy(struct xfrm_state *x)
kfree(esp->auth.work_icv); kfree(esp->auth.work_icv);
esp->auth.work_icv = NULL; esp->auth.work_icv = NULL;
} }
kfree(esp);
} }
int esp_init_state(struct xfrm_state *x, void *args) int esp_init_state(struct xfrm_state *x, void *args)
......
...@@ -313,6 +313,7 @@ static void ah6_destroy(struct xfrm_state *x) ...@@ -313,6 +313,7 @@ static void ah6_destroy(struct xfrm_state *x)
crypto_free_tfm(ahp->tfm); crypto_free_tfm(ahp->tfm);
ahp->tfm = NULL; ahp->tfm = NULL;
} }
kfree(ahp);
} }
static struct xfrm_type ah6_type = static struct xfrm_type ah6_type =
......
...@@ -406,6 +406,7 @@ void esp6_destroy(struct xfrm_state *x) ...@@ -406,6 +406,7 @@ void esp6_destroy(struct xfrm_state *x)
kfree(esp->auth.work_icv); kfree(esp->auth.work_icv);
esp->auth.work_icv = NULL; esp->auth.work_icv = NULL;
} }
kfree(esp);
} }
int esp6_init_state(struct xfrm_state *x, void *args) int esp6_init_state(struct xfrm_state *x, void *args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment