From: Maninder Singh <maninder1.s@samsung.com>
To: "ltp-list@lists.sourceforge.net" <ltp-list@lists.sourceforge.net>
Subject: [LTP] [PATCH 7/8] kernel/aio-stress.c: rempve explicit NULL check before free
Date: Wed, 10 Jun 2015 07:06:40 +0000 (GMT) [thread overview]
Message-ID: <344144289.810771433920000091.JavaMail.weblogic@epmlwas05b> (raw)
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
reply other threads:[~2015-06-10 7:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=344144289.810771433920000091.JavaMail.weblogic@epmlwas05b \
--to=maninder1.s@samsung.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox