From: Mark Wielaard Date: Tue, 1 Dec 2015 14:02:23 +0000 (+0100) Subject: elfcmp: Fix leaking Ebl handles. X-Git-Tag: elfutils-0.165~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=095f53490bcf684a834d835ee8118f1d8ea51698;p=thirdparty%2Felfutils.git elfcmp: Fix leaking Ebl handles. open_file () explicitly gets Ebl handles for both Elf files to compare. Make sure to close those when done. Signed-off-by: Mark Wielaard --- diff --git a/src/ChangeLog b/src/ChangeLog index d6d2936e1..27c638f90 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 0250fbe39..852b92f55 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);