diff options
author | RongQing.Li <roy.qing.li@gmail.com> | 2012-02-21 22:10:49 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 15:30:14 -0500 |
commit | 5095d64db1b978bdb31d30fed9e47dbf04f729be (patch) | |
tree | a912b34b0f78b40f46fde374fae530211ef22c4c /net/ipv6/ip6mr.c | |
parent | ba9adbe67e288823ac1deb7f11576ab5653f833e (diff) | |
download | linux-3.10-5095d64db1b978bdb31d30fed9e47dbf04f729be.tar.gz linux-3.10-5095d64db1b978bdb31d30fed9e47dbf04f729be.tar.bz2 linux-3.10-5095d64db1b978bdb31d30fed9e47dbf04f729be.zip |
ipv6: ip6_route_output() never returns NULL.
ip6_route_output() never returns NULL, so it is wrong to
check if the return value is NULL.
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r-- | net/ipv6/ip6mr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index c7e95c8c579..5aa3981a392 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1926,8 +1926,10 @@ static int ip6mr_forward2(struct net *net, struct mr6_table *mrt, }; dst = ip6_route_output(net, NULL, &fl6); - if (!dst) + if (dst->error) { + dst_release(dst); goto out_free; + } skb_dst_drop(skb); skb_dst_set(skb, dst); |