summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
diff options
context:
space:
mode:
authorKumar Amit Mehta2015-01-26 16:39:14 +0100
committerGreg Kroah-Hartman2015-01-28 19:56:49 +0100
commit0137f1a019952f955f4050495be6725a5f92eb5b (patch)
tree617cee02a9dfc082fed719c2922b00d3ed02f2e6 /drivers/staging/rtl8188eu/core/rtw_wlan_util.c
parentstaging: rtl8712: remove useless printing line (diff)
downloadkernel-qcow2-linux-0137f1a019952f955f4050495be6725a5f92eb5b.tar.gz
kernel-qcow2-linux-0137f1a019952f955f4050495be6725a5f92eb5b.tar.xz
kernel-qcow2-linux-0137f1a019952f955f4050495be6725a5f92eb5b.zip
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>
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_wlan_util.c')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_wlan_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
index 3e9b6e932641..a3ffc691be9a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
@@ -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;