mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
[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>
This commit is contained in:
parent
c9204d9ca7
commit
26db167702
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue