[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ef245c4f59f8419da9011d1b3d522e6e@realtek.com>
Date: Thu, 1 Jun 2023 07:41:05 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Minjie Du <duminjie@...o.com>,
"kvalo@...nel.org" <kvalo@...nel.org>
CC: "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v1] drivers: fix the parameter bin reference preceded by free
> -----Original Message-----
> From: Minjie Du <duminjie@...o.com>
> Sent: Thursday, June 1, 2023 3:23 PM
> To: Ping-Ke Shih <pkshih@...ltek.com>; kvalo@...nel.org
> Cc: linux-wireless@...r.kernel.org; linux-kernel@...r.kernel.org; Minjie Du <duminjie@...o.com>
> Subject: [PATCH v1] drivers: fix the parameter bin reference preceded by free
subject prefix should be "wifi: rtw89: fix ... "
>
> We assign the variable bin to NULL,
> fix variable bin reference preceded by free.
>
> Signed-off-by: Minjie Du <duminjie@...o.com>
> ---
> drivers/net/wireless/realtek/rtw89/debug.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
> index 6f418f14ec3f..4541b4d48e69 100644
> --- a/drivers/net/wireless/realtek/rtw89/debug.c
> +++ b/drivers/net/wireless/realtek/rtw89/debug.c
> @@ -2982,6 +2982,7 @@ static u8 *rtw89_hex2bin_user(struct rtw89_dev *rtwdev,
> if (hex2bin(bin, buf, num)) {
> rtw89_info(rtwdev, "valid format: H1H2H3...\n");
> kfree(bin);
> + bin = NULL;
> err = -EINVAL;
> }
Do you meet real problem? or code checker finds this?
When 'err' is set, we don't touch 'bin' anymore.
Ping-Ke
Powered by blists - more mailing lists