aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-09-08 18:11:55 -0400
committerDavid S. Miller <davem@davemloft.net>2005-09-08 18:11:55 -0400
commite104411b82f5c4d19752c335492036abdbf5880d (patch)
tree03f26f98685689ab6bfa47d5bdbb6730f64bfadb /net/ipv6/icmp.c
parentcf0b450cd5176b68ac7d5bbe68aeae6bb6a5a4b8 (diff)
[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/icmp.c')
-rw-r--r--net/ipv6/icmp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 34e99c55e856..b7185fb3377c 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -374,7 +374,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
374 if (err) 374 if (err)
375 goto out; 375 goto out;
376 if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) 376 if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)
377 goto out_dst_release; 377 goto out;
378 378
379 if (ipv6_addr_is_multicast(&fl.fl6_dst)) 379 if (ipv6_addr_is_multicast(&fl.fl6_dst))
380 hlimit = np->mcast_hops; 380 hlimit = np->mcast_hops;
@@ -469,7 +469,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
469 if (err) 469 if (err)
470 goto out; 470 goto out;
471 if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) 471 if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)
472 goto out_dst_release; 472 goto out;
473 473
474 if (ipv6_addr_is_multicast(&fl.fl6_dst)) 474 if (ipv6_addr_is_multicast(&fl.fl6_dst))
475 hlimit = np->mcast_hops; 475 hlimit = np->mcast_hops;
@@ -505,7 +505,6 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
505out_put: 505out_put:
506 if (likely(idev != NULL)) 506 if (likely(idev != NULL))
507 in6_dev_put(idev); 507 in6_dev_put(idev);
508out_dst_release:
509 dst_release(dst); 508 dst_release(dst);
510out: 509out:
511 icmpv6_xmit_unlock(); 510 icmpv6_xmit_unlock();