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

Commit 0137f1a0 authored by Kumar Amit Mehta's avatar Kumar Amit Mehta Committed by Greg Kroah-Hartman
Browse files

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: default avatarKumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1007c692
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
	if (!bssid)
		return _FAIL;

	subtype = GetFrameSubType(pframe) >> 4;