linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211_hwsim: missing NULL check
@ 2015-11-30  7:16 Rahul Jain
  2015-12-02  9:51 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Jain @ 2015-11-30  7:16 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, netdev, linux-kernel, Amit Khatri, Rahul Jain

From: Amit Khatri <amit.khatri@samsung.com>

txrate variable might be NULL and passing inside function
without NULL check.

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
---
 drivers/net/wireless/mac80211_hwsim.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 194264c..72e4931 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -814,6 +814,9 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_skb);
 	struct ieee80211_rate *txrate = ieee80211_get_tx_rate(hw, info);
 
+	if (!txrate)
+		return;
+
 	if (!netif_running(hwsim_mon))
 		return;
 
-- 
1.9.1


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

end of thread, other threads:[~2015-12-02  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30  7:16 [PATCH] mac80211_hwsim: missing NULL check Rahul Jain
2015-12-02  9:51 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).