mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
rsi: fix missing null pointer check from a failed ieee80211_probereq_get call
The call to ieee80211_probereq_get can return NULL if a skb allocation
fails, so add a null pointer check and free an earlier skb on the error
exit return path.
Fixes: 7fdcb8e126 ("rsi: add support for hardware scan offload")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
c913774951
commit
74ee436f95
1 changed files with 4 additions and 0 deletions
|
|
@ -1726,6 +1726,10 @@ int rsi_send_bgscan_probe_req(struct rsi_common *common,
|
|||
|
||||
probereq_skb = ieee80211_probereq_get(common->priv->hw, vif->addr, ssid,
|
||||
ssid_len, scan_req->ie_len);
|
||||
if (!probereq_skb) {
|
||||
dev_kfree_skb(skb);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memcpy(&skb->data[frame_len], probereq_skb->data, probereq_skb->len);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue