From owner-svn-src-head@freebsd.org Thu Dec 28 05:33:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3CFFEA79E9; Thu, 28 Dec 2017 05:33:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE1BF6B2F3; Thu, 28 Dec 2017 05:33:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBS5XJse024099; Thu, 28 Dec 2017 05:33:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBS5XJRC024098; Thu, 28 Dec 2017 05:33:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712280533.vBS5XJRC024098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Dec 2017 05:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327263 - head/usr.sbin/btxld X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/btxld X-SVN-Commit-Revision: 327263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2017 05:33:21 -0000 Author: imp Date: Thu Dec 28 05:33:19 2017 New Revision: 327263 URL: https://svnweb.freebsd.org/changeset/base/327263 Log: 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 Modified: head/usr.sbin/btxld/btxld.c Modified: head/usr.sbin/btxld/btxld.c ============================================================================== --- head/usr.sbin/btxld/btxld.c Thu Dec 28 05:32:59 2017 (r327262) +++ head/usr.sbin/btxld/btxld.c Thu Dec 28 05:33:19 2017 (r327263) @@ -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,