diff options
author | Andreas Schwab <schwab@redhat.com> | 2011-02-25 20:49:48 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-02-25 20:49:48 -0500 |
commit | 4bff6e0175ed195871f4e01cc4c4c33274b8f6e3 (patch) | |
tree | c66f1fa828edf1592d7f73c4200c16ae2996f8b5 /elf/dl-load.c | |
parent | 661b9e2014b3964469198ce7697a1d0d06aa4882 (diff) | |
download | glibc-4bff6e0175ed195871f4e01cc4c4c33274b8f6e3.zip glibc-4bff6e0175ed195871f4e01cc4c4c33274b8f6e3.tar.gz glibc-4bff6e0175ed195871f4e01cc4c4c33274b8f6e3.tar.bz2 |
Fix memory leak in dlopen with RTLD_NOLOAD.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index 41b5ce7..1ad16a0 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -894,6 +894,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp, { /* We are not supposed to load the object unless it is already loaded. So return now. */ + free (realname); __close (fd); return NULL; } @@ -912,6 +913,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp, _dl_zerofd = _dl_sysdep_open_zero_fill (); if (_dl_zerofd == -1) { + free (realname); __close (fd); _dl_signal_error (errno, NULL, NULL, N_("cannot open zero fill device")); |