[PATCH libXau 1/3] AuDispose.c:remove redundant null check on calling free()

walter harms wharms at bfs.de
Sat Oct 28 17:14:13 UTC 2017


redundant null check on auth->address calling free()
redundant null check on auth->number calling free()
redundant null check on auth->name calling free()

Signed-off-by: Walter Harms <wharms at bfs.de>
---
 AuDispose.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/AuDispose.c b/AuDispose.c
index 2a9b2f1..355224d 100644
--- a/AuDispose.c
+++ b/AuDispose.c
@@ -34,9 +34,9 @@ void
 XauDisposeAuth (Xauth *auth)
 {
     if (auth) {
-	if (auth->address) (void) free (auth->address);
-	if (auth->number) (void) free (auth->number);
-	if (auth->name) (void) free (auth->name);
+	free (auth->address);
+	free (auth->number);
+	free (auth->name);
 	if (auth->data) {
 	    (void) bzero (auth->data, auth->data_length);
 	    (void) free (auth->data);
-- 
2.1.4



More information about the xorg-devel mailing list