From: Cyril Hrubis <chrubis@suse.cz>
To: Zhao Gongyi <zhaogongyi@huawei.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] futex_waitv01: Correct assign and add cleanup
Date: Thu, 14 Apr 2022 15:42:27 +0200 [thread overview]
Message-ID: <Ylgkw1ZVsvgKWQXL@yuki> (raw)
In-Reply-To: <20220413112405.48471-1-zhaogongyi@huawei.com>
Hi!
> +static void cleanup(void)
> +{
> + if (futex != NULL)
> + free(futex);
free(NULL) is no-op, there is no reason to check for NULL before passing
a pointer to free().
The rest of the changes looks good to me.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-04-14 13:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 11:24 [LTP] [PATCH] futex_waitv01: Correct assign and add cleanup Zhao Gongyi via ltp
2022-04-14 13:42 ` Cyril Hrubis [this message]
2022-04-14 15:25 ` Petr Vorel
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=Ylgkw1ZVsvgKWQXL@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=zhaogongyi@huawei.com \
/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