From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 40ABA1382AC for ; Mon, 20 Jun 2016 03:08:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FD3A141C1; Mon, 20 Jun 2016 03:08:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7524D141C1 for ; Mon, 20 Jun 2016 03:08:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 91CE53407B8 for ; Mon, 20 Jun 2016 03:08:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0A8A62420 for ; Mon, 20 Jun 2016 03:08:22 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1466391589.ac373d7fa13ca22ff8db50bd147aa8ef4aeef4e3.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: porting.h scanelf.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: ac373d7fa13ca22ff8db50bd147aa8ef4aeef4e3 X-VCS-Branch: master Date: Mon, 20 Jun 2016 03:08:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5d173b8e-a5bc-4cfe-a0f7-bc81a16741f1 X-Archives-Hash: 21dfcd979b37803b0745b36782e9c505 commit: ac373d7fa13ca22ff8db50bd147aa8ef4aeef4e3 Author: Mike Frysinger gentoo org> AuthorDate: Mon Jun 20 02:59:49 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Jun 20 02:59:49 2016 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=ac373d7f scanelf: enable cleanup for coverity porting.h | 4 ++++ scanelf.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/porting.h b/porting.h index c0d5ebc..2d79f28 100644 --- a/porting.h +++ b/porting.h @@ -83,6 +83,10 @@ #ifdef __SANITIZE_ADDRESS__ # define PAX_UTILS_CLEANUP 1 #endif +/* Coverity catches some things we leak on purpose. */ +#ifdef __COVERITY__ +# define PAX_UTILS_CLEANUP 1 +#endif #ifndef PAX_UTILS_CLEANUP # define PAX_UTILS_CLEANUP 0 #endif diff --git a/scanelf.c b/scanelf.c index 57c5156..1f3e356 100644 --- a/scanelf.c +++ b/scanelf.c @@ -2569,6 +2569,9 @@ static void cleanup(void) free(qa_textrels); free(qa_execstack); free(qa_wx_load); + + if (root_fd != AT_FDCWD) + close(root_fd); } int main(int argc, char *argv[])