2014-07-10 05:55:53

by Anil Belur

[permalink] [raw]
Subject: [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree()

From: Anil Belur <[email protected]>

- as kfree() internally check for NULL, additional check it not
required.

Signed-off-by: Anil Belur <[email protected]>
---
drivers/staging/rtl8723au/core/rtw_ap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index c8700b3..8714ae3 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -1270,8 +1270,7 @@ static void update_bcn_wps_ie(struct rtw_adapter *padapter)
pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen;
}

- if (pbackup_remainder_ie)
- kfree(pbackup_remainder_ie);
+ kfree(pbackup_remainder_ie);
}

static void update_bcn_p2p_ie(struct rtw_adapter *padapter)
--
1.9.1


2014-07-10 05:55:56

by Anil Belur

[permalink] [raw]
Subject: [PATCH 2/2] staging: rtl8723au: core: rtw_cmd.c - removed NULL pointer check before kfree()

From: Anil Belur <[email protected]>

- as kfree() internally checks for NULL, additional check it not
required.

Signed-off-by: Anil Belur <[email protected]>
---
drivers/staging/rtl8723au/core/rtw_cmd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c
index 1696cb8..b160780 100644
--- a/drivers/staging/rtl8723au/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
@@ -516,8 +516,7 @@ int rtw_joinbss_cmd23a(struct rtw_adapter *padapter,

psecnetwork = &psecuritypriv->sec_bss;
if (!psecnetwork) {
- if (pcmd)
- kfree(pcmd);
+ kfree(pcmd);

res = _FAIL;

--
1.9.1

2014-07-10 06:59:58

by Anil Belur

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree()


On Thursday 10 July 2014 11:25 AM, Anil Belur wrote:
> From: Anil Belur <[email protected]>
>
> - as kfree() internally check for NULL, additional check it not
> required.
>
Sorry - please ignore this patch set, they are already fixed by someone
else recently.