]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
__libdwfl_report_elf: Return NULL on overlap, don't (double) close elf.
authorMark Wielaard <mjw@redhat.com>
Thu, 18 Jun 2009 11:31:56 +0000 (13:31 +0200)
committerRoland McGrath <roland@redhat.com>
Thu, 18 Jun 2009 20:59:41 +0000 (13:59 -0700)
libdwfl/ChangeLog
libdwfl/dwfl_report_elf.c

index 97e888f0c2244b681c5b77022e4417993b279a20..f2348e20c2e58812d76d10dfefe7904cab9aa5e8 100644 (file)
@@ -1,3 +1,7 @@
+2009-06-18  Mark Wielaard  <mjw@redhat.com>
+
+       * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
+
 2009-06-13  Ulrich Drepper  <drepper@redhat.com>
 
        * derelocate.c: Don't use deprecated libelf functions.
index a58d3029983cc96fcfc64bcf869c88cc67db5a54..52b0c57d8136e12320bf3a6204da183112def385 100644 (file)
@@ -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.  */