From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8200159138601605457==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: [PATCH] elfcmp: Fix leaking Ebl handles. Date: Tue, 01 Dec 2015 15:08:54 +0100 Message-ID: <1448978934-8743-1-git-send-email-mjw@redhat.com> --===============8200159138601605457== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable open_file () explicitly gets Ebl handles for both Elf files to compare. Make sure to close those when done. Signed-off-by: Mark Wielaard --- src/ChangeLog | 4 ++++ src/elfcmp.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d6d2936..27c638f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2015-12-01 Mark Wielaard + + * elfcmp.c (main): Close ebl1 and ebl2 backends. + 2015-10-16 Mark Wielaard = * Makefile.am [BUILD_STATIC](libdw): Add -lz. diff --git a/src/elfcmp.c b/src/elfcmp.c index 0250fbe..852b92f 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -655,6 +655,8 @@ cannot read note section [%zu] '%s' in '%s': %s"), out: elf_end (elf1); elf_end (elf2); + ebl_closebackend (ebl1); + ebl_closebackend (ebl2); close (fd1); close (fd2); = -- = 2.5.0 --===============8200159138601605457==--