diff options
author | Emil Goode <emilgoode@gmail.com> | 2014-07-02 11:25:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-09 11:49:15 -0700 |
commit | 4fa426021426bb1846b3e86dee74517e481e089f (patch) | |
tree | 02293b065ad7adaa5b0df0e7f9731f0665d3e297 /drivers/staging/rtl8192e | |
parent | dd3fde11d3642e37f563e43ef10cd03377923e50 (diff) | |
download | linux-stable-4fa426021426bb1846b3e86dee74517e481e089f.tar.gz linux-stable-4fa426021426bb1846b3e86dee74517e481e089f.tar.bz2 linux-stable-4fa426021426bb1846b3e86dee74517e481e089f.zip |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 60de54cc601f..7db3e7445428 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); |