* [PATCH] rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()
@ 2016-08-09 19:54 Christian Engelmayer
2016-08-10 14:11 ` Larry Finger
2016-09-03 16:54 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Christian Engelmayer @ 2016-08-09 19:54 UTC (permalink / raw)
To: Larry.Finger, chaoming_li
Cc: kvalo, arnd, joe, linux-wireless, Christian Engelmayer
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>
---
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
index b88c7ee72dbf..ba30efc2d195 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
@@ -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:
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()
2016-08-09 19:54 [PATCH] rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info() Christian Engelmayer
@ 2016-08-10 14:11 ` Larry Finger
2016-09-03 16:54 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2016-08-10 14:11 UTC (permalink / raw)
To: Christian Engelmayer, chaoming_li; +Cc: kvalo, arnd, joe, linux-wireless
On 08/09/2016 02:54 PM, Christian Engelmayer wrote:
> 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>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
This patch looks good. Thanks.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
> index b88c7ee72dbf..ba30efc2d195 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
> @@ -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:
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()
2016-08-09 19:54 [PATCH] rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info() Christian Engelmayer
2016-08-10 14:11 ` Larry Finger
@ 2016-09-03 16:54 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-09-03 16:54 UTC (permalink / raw)
To: Christian Engelmayer
Cc: Larry.Finger, chaoming_li, arnd, joe, linux-wireless,
Christian Engelmayer
Christian Engelmayer <cengelma@gmx.at> wrote:
> 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>
Thanks, 1 patch applied to wireless-drivers-next.git:
3eeacaa902a3 rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()
--
Sent by pwcli
https://patchwork.kernel.org/patch/9272147/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-03 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 19:54 [PATCH] rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info() Christian Engelmayer
2016-08-10 14:11 ` Larry Finger
2016-09-03 16:54 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).