public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8192e prohibit deferencing of NULL pointer
@ 2014-06-18 18:16 Andreas Platschek
  2014-06-18 18:33 ` Valentina Manea
  2014-06-18 18:48 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Platschek @ 2014-06-18 18:16 UTC (permalink / raw)
  To: kernel-janitors

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@ict.tuwien.ac.at>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-18 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 18:16 [PATCH] Staging: rtl8192e prohibit deferencing of NULL pointer Andreas Platschek
2014-06-18 18:33 ` Valentina Manea
2014-06-18 18:48 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox