[PATCH] Staging: rtl8192e prohibit deferencing of NULL pointer

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

 



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 |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c
b/drivers/staging/rtl8192e/rtllib_rx.c
index 60de54c..badf6e2 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1496,7 +1496,9 @@ 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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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