mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
iwlwifi: mei: fix potential NULL-ptr deref
If SKB allocation fails, continue rather than using the NULL
pointer.
Coverity CID: 1497650
Cc: [email protected]
Fixes: 2da4366f9e ("iwlwifi: mei: add the driver to allow cooperation with CSME")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
Link: https://lore.kernel.org/r/20220517120045.90c1b1fd534e.Ibb42463e74d0ec7d36ec81df22e171ae1f6268b0@changeid
Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
1 parent
55cf10488d
commit
78488a64ae
1 file changed
+2
@@ -1020,6 +1020,8 @@ static void iwl_mei_handle_sap_data(struct mei_cl_device *cldev,
|
||||
|
||||
/* We need enough room for the WiFi header + SNAP + IV */
|
||||
skb = netdev_alloc_skb(netdev, len + QOS_HDR_IV_SNAP_LEN);
|
||||
if (!skb)
|
||||
continue;
|
||||
|
||||
skb_reserve(skb, QOS_HDR_IV_SNAP_LEN);
|
||||
ethhdr = skb_push(skb, sizeof(*ethhdr));
|
||||
|
||||
Reference in new issue
Block a user