diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-09-07 22:58:47 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-09-07 22:58:47 -0400 |
commit | c966526aa40273e0da42dfd26fa8c0f409e69b86 (patch) | |
tree | b754d8ca3cba598986828743b2d1e7b5469f492a | |
parent | 680f813ed3b9e6203e952c6d7275526ccc04d17f (diff) | |
download | glibc-c966526aa40273e0da42dfd26fa8c0f409e69b86.zip glibc-c966526aa40273e0da42dfd26fa8c0f409e69b86.tar.gz glibc-c966526aa40273e0da42dfd26fa8c0f409e69b86.tar.bz2 |
Fix memory leak in case of failed dlopen
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | elf/dl-load.c | 2 |
3 files changed, 6 insertions, 1 deletions
@@ -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. @@ -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); |