Skip to contentSkip to conversation

tools:proc/ksym.c: remove explicit NULL check before free

PATCH In review Maninder Singh 1 participant 1 message Jun 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 tools:proc/ksym.c: remove explicit NULL check before free

No need of NULL check before free

---
 tools/top-LTP/proc/ksym.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/top-LTP/proc/ksym.c +1 -2
index 19c5f27..559edca 100644
@@ -289,8 +289,7 @@ open_again:
 	close(fd);
 	return;
 hell:
-	if (buf)
-		free(buf);
+	free(buf);
 	*bufp = NULL;
 	*roomp = 0;		/* this function will never work again */
 	total = 0;
Signature · 6 lines
1.7.9.5
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list