mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
Explicitly ignore return value from remove. We wouldn't do anything
differently if we can't unlink the temporary file. Also, free the temporary file name when we set it to NULL. CID: 1006909, 719448
This commit is contained in:
parent
829ec26617
commit
1987e300d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327263
|
@ -189,7 +189,7 @@ static void
|
|||
cleanup(void)
|
||||
{
|
||||
if (tname)
|
||||
remove(tname);
|
||||
(void)remove(tname);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -287,6 +287,7 @@ btxld(const char *iname)
|
|||
err(2, "%s", tname);
|
||||
if (rename(tname, oname))
|
||||
err(2, "%s: Can't rename to %s", tname, oname);
|
||||
free((void*)(intptr_t)tname);
|
||||
tname = NULL;
|
||||
if (verbose) {
|
||||
printf(binfo, btx.btx_majver, btx.btx_minver, btx.btx_textsz,
|
||||
|
|
Loading…
Reference in a new issue