summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorEmil Goode <emilgoode@gmail.com>2014-07-02 11:25:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 11:49:15 -0700
commit4fa426021426bb1846b3e86dee74517e481e089f (patch)
tree02293b065ad7adaa5b0df0e7f9731f0665d3e297 /drivers/staging/rtl8192e
parentdd3fde11d3642e37f563e43ef10cd03377923e50 (diff)
Staging: rtl8192e: Fix potential NULL pointer dereference
We need to make sure the struct rtllib_device pointer ieee is not NULL after the goto rx_dropped label since it is dereferenced there. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/rtllib_rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 60de54cc601..7db3e744542 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
return ret;
rx_dropped:
- ieee->stats.rx_dropped++;
+ if (ieee)
+ ieee->stats.rx_dropped++;
return 0;
}
EXPORT_SYMBOL(rtllib_rx);