No need of NULL check before free
Signed-off-by: Maninder Singh <[email protected]>
Signed-off-by: Akhilesh Kumar <[email protected]>
---
tools/top-LTP/proc/ksym.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/top-LTP/proc/ksym.c b/tools/top-LTP/proc/ksym.c
index 19c5f27..559edca 100644
--- a/tools/top-LTP/proc/ksym.c
+++ b/tools/top-LTP/proc/ksym.c
@@ -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;
--
1.7.9.5
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list