lkml.org 
[lkml]   [2009]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] hamradio: avoid null deref
If dev == NULL we shouldn't dereference it.

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/drivers/net/hamradio/bpqether.c 2009-12-22 23:58:56.000000000 +0200
+++ devel/drivers/net/hamradio/bpqether.c 2009-12-22 23:59:46.000000000 +0200
@@ -283,7 +283,6 @@ static netdev_tx_t bpq_xmit(struct sk_bu
bpq = netdev_priv(dev);

if ((dev = bpq_get_ether_dev(dev)) == NULL) {
- dev->stats.tx_dropped++;
kfree_skb(skb);
return NETDEV_TX_OK;
}

\
 
 \ /
  Last update: 2009-12-23 14:29    [W:0.076 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site