From 14c43aeb121b645bf1c0198c94a5a58609bed21b Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 26 Jan 2015 16:01:30 -0600 Subject: [PATCH] rtl8188eu: Fix error path for memory allocation failure Signed-off-by: Larry Finger --- core/rtw_wlan_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 879f8f2..5e4759f 100755 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -1359,6 +1359,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len) } bssid = (WLAN_BSSID_EX *)rtw_zmalloc(sizeof(WLAN_BSSID_EX)); + if (!bssid) + return _FAIL; subtype = GetFrameSubType(pframe) >> 4;