Commit 4fa42602 authored by Emil Goode's avatar Emil Goode Committed by Greg Kroah-Hartman

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: default avatarEmil Goode <emilgoode@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dd3fde11
...@@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb, ...@@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
return ret; return ret;
rx_dropped: rx_dropped:
ieee->stats.rx_dropped++; if (ieee)
ieee->stats.rx_dropped++;
return 0; return 0;
} }
EXPORT_SYMBOL(rtllib_rx); EXPORT_SYMBOL(rtllib_rx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment