No need of NULL check before free

Signed-off-by: Maninder Singh <maninder...@samsung.com>
Signed-off-by: Akhilesh Kumar <akhiles...@samsung.com>
---
 testcases/kernel/io/ltp-aiodio/aio-stress.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/testcases/kernel/io/ltp-aiodio/aio-stress.c 
b/testcases/kernel/io/ltp-aiodio/aio-stress.c
index 06a4953..67d8acb 100644
--- a/testcases/kernel/io/ltp-aiodio/aio-stress.c
+++ b/testcases/kernel/io/ltp-aiodio/aio-stress.c
@@ -991,12 +991,9 @@ int setup_ious(struct thread_info *t,
        return 0;
 
 free_buffers:
-       if (t->ios)
-               free(t->ios);
-       if (t->iocbs)
-               free(t->iocbs);
-       if (t->events)
-               free(t->events);
+       free(t->ios);
+       free(t->iocbs);
+       free(t->events);
        return -1;
 }
 
-- 
1.7.9.5
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to