diff options
author | RongQing.Li <roy.qing.li@gmail.com> | 2012-02-21 22:10:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 15:30:15 -0500 |
commit | 5d38b1f8cf8798d4df7809b3f3e38fad4d923e85 (patch) | |
tree | 06ba517dc59090a928dd8feabc348880adc79347 /net/netfilter | |
parent | 0541743b4b35f2ddc9e490b4e354930168b60d23 (diff) | |
download | linux-stable-5d38b1f8cf8798d4df7809b3f3e38fad4d923e85.tar.gz linux-stable-5d38b1f8cf8798d4df7809b3f3e38fad4d923e85.tar.bz2 linux-stable-5d38b1f8cf8798d4df7809b3f3e38fad4d923e85.zip |
netfilter: 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/netfilter')
-rw-r--r-- | net/netfilter/xt_TEE.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c index 3aae66facf9f..4d5057902839 100644 --- a/net/netfilter/xt_TEE.c +++ b/net/netfilter/xt_TEE.c @@ -152,9 +152,10 @@ tee_tg_route6(struct sk_buff *skb, const struct xt_tee_tginfo *info) fl6.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) | (iph->flow_lbl[1] << 8) | iph->flow_lbl[2]; dst = ip6_route_output(net, NULL, &fl6); - if (dst == NULL) + if (dst->error) { + dst_release(dst); return false; - + } skb_dst_drop(skb); skb_dst_set(skb, dst); skb->dev = dst->dev; |