diff mbox series

[v1] drivers: fix the parameter bin reference preceded by free

Message ID 20230601072322.486-1-duminjie@vivo.com
State New
Headers show
Series [v1] drivers: fix the parameter bin reference preceded by free | expand

Commit Message

Minjie Du June 1, 2023, 7:23 a.m. UTC
We assign the variable bin to NULL,
fix variable bin reference preceded by free.

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 drivers/net/wireless/realtek/rtw89/debug.c | 1 +
 1 file changed, 1 insertion(+)

--
2.25.1
diff mbox series

Patch

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;
        }