summaryrefslogtreecommitdiff
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-09-09 02:11:55 +0400
committerDavid S. Miller <davem@davemloft.net>2005-09-09 02:11:55 +0400
commite104411b82f5c4d19752c335492036abdbf5880d (patch)
tree03f26f98685689ab6bfa47d5bdbb6730f64bfadb /net/ipv6/udp.c
parentcf0b450cd5176b68ac7d5bbe68aeae6bb6a5a4b8 (diff)
downloadlinux-e104411b82f5c4d19752c335492036abdbf5880d.tar.xz
[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>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index f5ae14810a70..69b146843a20 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -799,10 +799,8 @@ do_udp_sendmsg:
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;
- }
if (hlimit < 0) {
if (ipv6_addr_is_multicast(&fl->fl6_dst))