]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ip6_tunnel.c
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[linux-2.6-omap-h63xx.git] / net / ipv6 / ip6_tunnel.c
index cf94372d1af39980b108f3161fd8d94837e0f94c..e315d0f80af1ef3a531c8293e8c33d56e6b08102 100644 (file)
@@ -525,6 +525,7 @@ ip6ip6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
 
        if ((t = ip6ip6_tnl_lookup(&ipv6h->saddr, &ipv6h->daddr)) != NULL) {
                if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
+                       read_unlock(&ip6ip6_lock);
                        kfree_skb(skb);
                        return 0;
                }
@@ -756,8 +757,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
        }
        ip6_tnl_dst_store(t, dst);
 
-       if (opt)
-               kfree(opt);
+       kfree(opt);
 
        t->recursion--;
        return 0;
@@ -766,8 +766,7 @@ tx_err_link_failure:
        dst_link_failure(skb);
 tx_err_dst_release:
        dst_release(dst);
-       if (opt)
-               kfree(opt);
+       kfree(opt);
 tx_err:
        stats->tx_errors++;
        stats->tx_dropped++;