diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2019-03-12 12:06:48 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-31 16:47:30 +0300 |
commit | 09ef780d7d18cd65c00efe558e1904de41cc6738 (patch) | |
tree | 9e22fecb7ee5948ef356f4eda9571b389157c687 /drivers/net/wireless/realtek/rtlwifi/rtl8188ee | |
parent | ae087a4a56a64de9a07b042388cffc6be021c583 (diff) | |
download | linux-09ef780d7d18cd65c00efe558e1904de41cc6738.tar.xz |
rtlwifi: fix potential NULL pointer dereference
[ Upstream commit 60209d482b97743915883d293c8b85226d230c19 ]
In case dev_alloc_skb fails, the fix safely returns to avoid
potential NULL pointer dereference.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8188ee')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c index a2eca669873b..726d3d5fa2ef 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c @@ -620,6 +620,8 @@ void rtl88e_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished) u1rsvdpageloc, 3); skb = dev_alloc_skb(totalpacketlen); + if (!skb) + return; skb_put_data(skb, &reserved_page_packet, totalpacketlen); rtstatus = rtl_cmd_send_packet(hw, skb); |