From: Mark Wielaard Date: Thu, 18 Jun 2009 11:31:56 +0000 (+0200) Subject: __libdwfl_report_elf: Return NULL on overlap, don't (double) close elf. X-Git-Tag: elfutils-0.142~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2256e360a13df88ae3d3e8697f1753dc19be70c0;p=thirdparty%2Felfutils.git __libdwfl_report_elf: Return NULL on overlap, don't (double) close elf. --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 97e888f0c..f2348e20c 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,7 @@ +2009-06-18 Mark Wielaard + + * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap. + 2009-06-13 Ulrich Drepper * derelocate.c: Don't use deprecated libelf functions. diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index a58d30299..52b0c57d8 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -235,11 +235,10 @@ __libdwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, else if ((fd >= 0 && m->main.fd != fd) || strcmp (m->main.name, file_name)) { - elf_end (elf); overlap: m->gc = true; __libdwfl_seterrno (DWFL_E_OVERLAP); - m = NULL; + return NULL; } /* Preinstall the open ELF handle for the module. */