mirror of https://gitee.com/openkylin/linux.git
staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereference
In rtw_check_bcn_info(), check the return value of kzalloc() before dereferencing it, to avoid NULL pointer dereference. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1007c69226
commit
0137f1a019
|
@ -931,6 +931,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
||||||
}
|
}
|
||||||
|
|
||||||
bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
|
bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
|
||||||
|
if (!bssid)
|
||||||
|
return _FAIL;
|
||||||
|
|
||||||
subtype = GetFrameSubType(pframe) >> 4;
|
subtype = GetFrameSubType(pframe) >> 4;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue