From: John Snow <jsnow@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Cc: Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] tests/hd-geo-test: Don't pass NULL to unlink()
Date: Tue, 6 Sep 2016 15:06:18 -0400 [thread overview]
Message-ID: <4f213302-3457-d060-3f84-f16c14087f0c@redhat.com> (raw)
In-Reply-To: <CAFEAcA_YcnZZpCtT1-HQseZDN+vCuTHQekpE2WMKS_Uj2Vne2Q@mail.gmail.com>
On 09/06/2016 08:47 AM, Peter Maydell wrote:
> Ping?
>
> thanks
> -- PMM
>
Not sure who this belongs to; I can queue it up alongside some IDE and
FDC stuff in the future if you like.
--js
>
> On 5 August 2016 at 11:03, Peter Maydell <peter.maydell@linaro.org> wrote:
>> The unlink() function doesn't accept a NULL pointer, so
>> don't pass it one. Spotted by the clang sanitizer.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> tests/hd-geo-test.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/hd-geo-test.c b/tests/hd-geo-test.c
>> index 12ee392..6176e81 100644
>> --- a/tests/hd-geo-test.c
>> +++ b/tests/hd-geo-test.c
>> @@ -416,7 +416,9 @@ int main(int argc, char **argv)
>> ret = g_test_run();
>>
>> for (i = 0; i < backend_last; i++) {
>> - unlink(img_file_name[i]);
>> + if (img_file_name[i]) {
>> + unlink(img_file_name[i]);
>> + }
>> }
>>
>> return ret;
>> --
>> 2.7.4
>
--
—js
next prev parent reply other threads:[~2016-09-06 19:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 10:03 [Qemu-devel] [PATCH] tests/hd-geo-test: Don't pass NULL to unlink() Peter Maydell
2016-08-05 11:19 ` Markus Armbruster
2016-08-05 11:57 ` Peter Maydell
2016-09-06 12:47 ` Peter Maydell
2016-09-06 19:06 ` John Snow [this message]
2016-09-06 19:07 ` Peter Maydell
2016-09-06 19:15 ` John Snow
2016-09-06 19:52 ` Peter Maydell
2016-09-08 10:27 ` Peter Maydell
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=4f213302-3457-d060-3f84-f16c14087f0c@redhat.com \
--to=jsnow@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).