aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-07 22:58:47 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-07 22:58:47 -0400
commitc966526aa40273e0da42dfd26fa8c0f409e69b86 (patch)
treeb754d8ca3cba598986828743b2d1e7b5469f492a
parent680f813ed3b9e6203e952c6d7275526ccc04d17f (diff)
downloadglibc-c966526aa40273e0da42dfd26fa8c0f409e69b86.zip
glibc-c966526aa40273e0da42dfd26fa8c0f409e69b86.tar.gz
glibc-c966526aa40273e0da42dfd26fa8c0f409e69b86.tar.bz2
Fix memory leak in case of failed dlopen
-rw-r--r--ChangeLog3
-rw-r--r--NEWS2
-rw-r--r--elf/dl-load.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8062781..7e77bc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-09-07 Ulrich Drepper <drepper@gmail.com>
+ [BZ #13123]
+ * elf/dl-load.c (lose): Free l_origin if it is valid.
+
* sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S: Fix mixup in section
names.
* sysdeps/i386/i686/multiarch/strchr-sse2.S: Likewise.
diff --git a/NEWS b/NEWS
index bd8ee5b..6e2ab66 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ Version 2.15
* The following bugs are resolved with this release:
9696, 12868, 12852, 12874, 12885, 12907, 12922, 12935, 13007, 13021,
- 13068, 13092, 13114, 13134, 13150
+ 13068, 13092, 13114, 13123, 13134, 13150
* New program pldd to list loaded object of a process
Implemented by Ulrich Drepper.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 24b3359..7d7008d 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -888,6 +888,8 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l,
/* The file might already be closed. */
if (fd != -1)
(void) __close (fd);
+ if (l->l_origin != (char *) -1l)
+ free (l->l_origin);
free (l);
free (realname);