]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
elfcmp: Fix leaking Ebl handles.
authorMark Wielaard <mjw@redhat.com>
Tue, 1 Dec 2015 14:02:23 +0000 (15:02 +0100)
committerMark Wielaard <mjw@redhat.com>
Sat, 2 Jan 2016 19:37:44 +0000 (20:37 +0100)
open_file () explicitly gets Ebl handles for both Elf files to compare.
Make sure to close those when done.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/elfcmp.c

index d6d2936e1b6465223944fda1cab2297fcfc62fe0..27c638f90783add100e750e50e2fb07f7f7977d1 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-01  Mark Wielaard  <mjw@redhat.com>
+
+       * elfcmp.c (main): Close ebl1 and ebl2 backends.
+
 2015-10-16  Mark Wielaard  <mjw@redhat.com>
 
        * Makefile.am [BUILD_STATIC](libdw): Add -lz.
index 0250fbe39e3b56046bb40013d93651a29cac578e..852b92f55ceca63d29a37a360158b0d7b725be1f 100644 (file)
@@ -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);