lkml.org 
[lkml]   [2014]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] staging: rtl8723au: core: rtw_cmd.c - removed NULL pointer check before kfree()
Date
From: Anil Belur <askb23@gmail.com>

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

Signed-off-by: Anil Belur <askb23@gmail.com>
---
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


\
 
 \ /
  Last update: 2014-07-10 08:41    [W:0.054 / U:1.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site