Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559434

[PATCH] rtl8188eu: core: Remove NULL test before vfree

From Shyam Saini <mayhs11saini@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] rtl8188eu: core: Remove NULL test before vfree
Date 2017-01-16 05:20 +0100
Message-ID <t06VX-3rb-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


vfree frees the virtually continuous block of memory beginning at
addr. If addr is NULL, no operation is performed. So, NULL test is not
needed before vfree().

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index b60b126..2a65e32 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -246,8 +246,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
 		pxmitbuf++;
 	}
 
-	if (pxmitpriv->pallocated_xmit_extbuf)
-		vfree(pxmitpriv->pallocated_xmit_extbuf);
+	vfree(pxmitpriv->pallocated_xmit_extbuf);
 
 	rtw_free_hwxmits(padapter);
 
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] rtl8188eu: core: Remove NULL test before vfree Shyam Saini <mayhs11saini@gmail.com> - 2017-01-16 05:20 +0100

csiph-web