]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ip6_output.c
V4L/DVB (6103): dvb_ca_en50221: return correct error code value
[linux-2.6-omap-h63xx.git] / net / ipv6 / ip6_output.c
index 5dead399fe64dc50366ccbe575db02021ff4d076..26de3c0ea31e516c23670c924b579be43128847b 100644 (file)
@@ -1427,8 +1427,9 @@ void ip6_flush_pending_frames(struct sock *sk)
        struct sk_buff *skb;
 
        while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) {
-               IP6_INC_STATS(ip6_dst_idev(skb->dst),
-                             IPSTATS_MIB_OUTDISCARDS);
+               if (skb->dst)
+                       IP6_INC_STATS(ip6_dst_idev(skb->dst),
+                                     IPSTATS_MIB_OUTDISCARDS);
                kfree_skb(skb);
        }