public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] elfcmp: Fix leaking Ebl handles.
@ 2016-01-02 19:57 Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2016-01-02 19:57 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

On Tue, Dec 01, 2015 at 03:08:54PM +0100, Mark Wielaard wrote:
> open_file () explicitly gets Ebl handles for both Elf files to compare.
> Make sure to close those when done.

Pushed to master.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] elfcmp: Fix leaking Ebl handles.
@ 2015-12-01 14:08 Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2015-12-01 14:08 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

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 | 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  <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.
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-02 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-02 19:57 [PATCH] elfcmp: Fix leaking Ebl handles Mark Wielaard
  -- strict thread matches above, loose matches on Subject: below --
2015-12-01 14:08 Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).