[PATCH v2] Staging: rtl8192e prohibit deferencing of NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



v2: removed braces from if statement

If ieee == NULL we jump to rx_dropped. Therefore we have to check again,
if ieee == NULL before we use it.

Signed-off-by: Andreas Platschek <platschek@xxxxxxxxxxxxxxxx>
---
 drivers/staging/rtl8192e/rtllib_rx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c
b/drivers/staging/rtl8192e/rtllib_rx.c
index 60de54c..7258b17 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 != NULL)
+               ieee->stats.rx_dropped++;
        return 0;
 }
 EXPORT_SYMBOL(rtllib_rx);
-- 
1.7.10.4��.n��������+%������w��{.n����z�ޗ�����n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux