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,