diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-12-28 05:33:19 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-12-28 05:33:19 +0000 |
commit | 1987e300d03d46409022d67cb762c052c0fe06e2 (patch) | |
tree | 744503f5b6c80916e40217ab238ca1c111ed03a6 /usr.sbin/btxld | |
parent | 829ec266171e70063f2e406fea4b2f10d0206c5f (diff) | |
download | src-1987e300d03d46409022d67cb762c052c0fe06e2.tar.gz src-1987e300d03d46409022d67cb762c052c0fe06e2.zip |
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
Notes
Notes:
svn path=/head/; revision=327263
Diffstat (limited to 'usr.sbin/btxld')
-rw-r--r-- | usr.sbin/btxld/btxld.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/btxld/btxld.c b/usr.sbin/btxld/btxld.c index d18c9fcb2610..931a224fe998 100644 --- a/usr.sbin/btxld/btxld.c +++ b/usr.sbin/btxld/btxld.c @@ -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, |