]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()
authorChristian Engelmayer <cengelma@gmx.at>
Tue, 9 Aug 2016 19:54:12 +0000 (21:54 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 3 Sep 2016 16:53:45 +0000 (19:53 +0300)
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>
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c

index b88c7ee72dbfe1f5dea41be3286b35ae77674be7..ba30efc2d195b2eb91bf5f2b63bb1d801e594b73 100644 (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: