lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a8382b826464d76b3c721e99613d6e9@realtek.com>
Date:   Fri, 10 Mar 2023 03:49:48 +0000
From:   Ping-Ke Shih <pkshih@...ltek.com>
To:     Dongliang Mu <dzm91@...t.edu.cn>,
        Yan-Hsuan Chuang <tony0620emma@...il.com>,
        Kalle Valo <kvalo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
CC:     "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] wifi: rtw88: fix memory leak in rtw_usb_probe()



> -----Original Message-----
> From: Dongliang Mu <dzm91@...t.edu.cn>
> Sent: Thursday, March 9, 2023 10:17 AM
> To: Yan-Hsuan Chuang <tony0620emma@...il.com>; Kalle Valo <kvalo@...nel.org>; David S. Miller
> <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni
> <pabeni@...hat.com>
> Cc: Dongliang Mu <dzm91@...t.edu.cn>; linux-wireless@...r.kernel.org; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Subject: [PATCH v2] wifi: rtw88: fix memory leak in rtw_usb_probe()
> 
> drivers/net/wireless/realtek/rtw88/usb.c:876 rtw_usb_probe()
> warn: 'hw' from ieee80211_alloc_hw() not released on lines: 811
> 
> Fix this by modifying return to a goto statement.
> 
> Signed-off-by: Dongliang Mu <dzm91@...t.edu.cn>

Reviewed-by: Ping-Ke Shih <pkshih@...ltek.com>

> ---
> v1->v2: modify the commit title
>  drivers/net/wireless/realtek/rtw88/usb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c
> index 2a8336b1847a..68e1b782d199 100644
> --- a/drivers/net/wireless/realtek/rtw88/usb.c
> +++ b/drivers/net/wireless/realtek/rtw88/usb.c
> @@ -808,7 +808,7 @@ int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
> 
>         ret = rtw_usb_alloc_rx_bufs(rtwusb);
>         if (ret)
> -               return ret;
> +               goto err_release_hw;
> 
>         ret = rtw_core_init(rtwdev);
>         if (ret)
> --
> 2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ