Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f1d2d2b authored by John W. Linville's avatar John W. Linville
Browse files

rtl8180: avoid potential NULL deref in rtl8180_beacon_work



ieee80211_beacon_get can return NULL...

Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
parent c5d2711c
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -695,6 +695,8 @@ static void rtl8180_beacon_work(struct work_struct *work)


	/* grab a fresh beacon */
	/* grab a fresh beacon */
	skb = ieee80211_beacon_get(dev, vif);
	skb = ieee80211_beacon_get(dev, vif);
	if (!skb)
		goto resched;


	/*
	/*
	 * update beacon timestamp w/ TSF value
	 * update beacon timestamp w/ TSF value