summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2009-06-18 13:31:56 +0200
committerRoland McGrath <[email protected]>2009-06-18 13:59:41 -0700
commit2256e360a13df88ae3d3e8697f1753dc19be70c0 (patch)
treeeed7725b41ddcc07fd25150ff305d603b867031c
parent05c4e04640d173a4d1ce6e2f25a24060c21a67ab (diff)
__libdwfl_report_elf: Return NULL on overlap, don't (double) close elf.
-rw-r--r--libdwfl/ChangeLog4
-rw-r--r--libdwfl/dwfl_report_elf.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 97e888f0..f2348e20 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-18 Mark Wielaard <[email protected]>
+
+ * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
+
2009-06-13 Ulrich Drepper <[email protected]>
* derelocate.c: Don't use deprecated libelf functions.
diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c
index a58d3029..52b0c57d 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. */