diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-12-07 02:45:15 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-07 02:45:15 -0500 |
commit | 26db167702756d0022f8ea5f1f30cad3018cfe31 (patch) | |
tree | 26af4b280538a66772b0496f2b0d50fbe6a7cfb3 /net/ipv4/xfrm4_policy.c | |
parent | c9204d9ca79baac564b49d36d0228a69d7ded084 (diff) |
[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>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-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 d4107bb701b5..fb9f69c616f5 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -274,6 +274,8 @@ static void xfrm4_dst_destroy(struct dst_entry *dst) | |||
274 | 274 | ||
275 | if (likely(xdst->u.rt.idev)) | 275 | if (likely(xdst->u.rt.idev)) |
276 | in_dev_put(xdst->u.rt.idev); | 276 | in_dev_put(xdst->u.rt.idev); |
277 | if (likely(xdst->u.rt.peer)) | ||
278 | inet_putpeer(xdst->u.rt.peer); | ||
277 | xfrm_dst_destroy(xdst); | 279 | xfrm_dst_destroy(xdst); |
278 | } | 280 | } |
279 | 281 | ||