Skip to content

Commit

Permalink
[IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Dec 7, 2006
1 parent c9204d9 commit 26db167
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv4/xfrm4_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,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);
}

Expand Down

0 comments on commit 26db167

Please sign in to comment.