rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()

In case of (rtlhal->oem_id != RT_CID_DEFAULT), the function directly
returns and leaks the already allocated hwinfo memory. Go through the
correct exit path.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Christian Engelmayer 2016-08-09 21:54:12 +02:00 committed by Kalle Valo
parent a0c7858e74
commit 3eeacaa902
1 changed files with 1 additions and 1 deletions

View File

@ -1654,7 +1654,7 @@ static void _rtl8723e_read_adapter_info(struct ieee80211_hw *hw,
rtlefuse->autoload_failflag, hwinfo);
if (rtlhal->oem_id != RT_CID_DEFAULT)
return;
goto exit;
switch (rtlefuse->eeprom_oemid) {
case EEPROM_CID_DEFAULT: