public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 7/8] kernel/aio-stress.c: rempve explicit NULL check before free
@ 2015-06-10  7:06 Maninder Singh
  0 siblings, 0 replies; only message in thread
From: Maninder Singh @ 2015-06-10  7:06 UTC (permalink / raw)
  To: ltp-list@lists.sourceforge.net

No need of NULL check before free

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-10  7:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10  7:06 [LTP] [PATCH 7/8] kernel/aio-stress.c: rempve explicit NULL check before free Maninder Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox