diff options
author | David Miller <davem@davemloft.net> | 2006-12-07 00:40:36 -0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-12-16 16:20:47 -0800 |
commit | 0b427874213aae83d3a93b48c667e6946e331772 (patch) | |
tree | 8719274a72239607133c312f77b2ff20190adaea | |
parent | 2b64e22fdbc35b4a0e7c1cbda590daaced401c35 (diff) |
[PATCH] IPSEC: Fix inetpeer leak in ipv4 xfrm dst entries.
We grab a reference to the route's inetpeer entry but
forget to release it in xfrm4_dst_destroy().
Bug discovered by Kazunori MIYAZAWA <kazunori@miyazawa.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 8f50eae47d03..eae687d4db6e 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -252,6 +252,8 @@ static void xfrm4_dst_destroy(struct dst_entry *dst) if (likely(xdst->u.rt.idev)) in_dev_put(xdst->u.rt.idev); + if (likely(xdst->u.rt.peer)) + inet_putpeer(xdst->u.rt.peer); xfrm_dst_destroy(xdst); } |