mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
xfrm: Fix memleak on xfrm state destroy
We leak the page that we use to create skb page fragments
when destroying the xfrm_state. Fix this by dropping a
page reference if a page was assigned to the xfrm_state.
Fixes: cac2661c53 ("esp4: Avoid skb_cow_data whenever possible")
Reported-by: JD <[email protected]>
Reported-by: Paul Wouters <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
This commit is contained in:
parent
99a8efbb6e
commit
86c6739eda
1 changed files with 2 additions and 0 deletions
|
|
@ -495,6 +495,8 @@ static void ___xfrm_state_destroy(struct xfrm_state *x)
|
|||
x->type->destructor(x);
|
||||
xfrm_put_type(x->type);
|
||||
}
|
||||
if (x->xfrag.page)
|
||||
put_page(x->xfrag.page);
|
||||
xfrm_dev_state_free(x);
|
||||
security_xfrm_state_free(x);
|
||||
xfrm_state_free(x);
|
||||
|
|
|
|||
Loading…
Reference in a new issue