projects
/
unionfs-2.6.39.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a24340
)
[IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries.
author
David S. Miller
<davem@davemloft.net>
Sat, 9 Dec 2006 15:16:56 +0000
(16:16 +0100)
committer
Adrian Bunk
<bunk@stusta.de>
Sat, 9 Dec 2006 15:16:56 +0000
(16:16 +0100)
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: Adrian Bunk <bunk@stusta.de>
net/ipv4/xfrm4_policy.c
patch
|
blob
|
history
diff --git
a/net/ipv4/xfrm4_policy.c
b/net/ipv4/xfrm4_policy.c
index f285bbf296e28d79099887afa2882be75ddf32bc..09553605fba52188dc9d2c18e7b9a1da8036a42e 100644
(file)
--- a/
net/ipv4/xfrm4_policy.c
+++ b/
net/ipv4/xfrm4_policy.c
@@
-257,6
+257,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);
}