[XFRM]: Always release dst_entry on error in xfrm_lookup

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy
2005-09-08 15:11:55 -07:00
committed by David S. Miller
parent cf0b450cd5
commit e104411b82
9 changed files with 18 additions and 48 deletions

View File

@@ -175,10 +175,8 @@ ipv4_connected:
if (final_p)
ipv6_addr_copy(&fl.fl6_dst, final_p);
if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {
dst_release(dst);
if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)
goto out;
}
/* source address lookup done in ip6_dst_lookup */