From ca3c01356495ebfbb315c2984dda8eba88467597 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 13 Jul 2000 19:46:27 +0000 Subject: Update. * elf/Versions (ld): Export _dl_out_of_memory for GLIBC_2.2. * dlfcn/dlerror.c (dlerror): Don't free the error string if it is the report that we are out of memory. * elf/dl-deps.c (_dl_map_object_deps): Likewise. * elf/dl-libc.c (dlerror_run): Likewise. * elf/dl-open.c (_dl_open): Likewise. * elf/rtld.c (dl_main): Likewise. * elf/dl-error.c: Define _dl_out_of_memory. (_dl_signal_error): Return _dl_signal_error if we cannot duplicate the error string. * sysdeps/generic/ldsodefs.h: Declare _dl_out_of_memory. * dlfcn/dlerror.c (free_key_mem): Also free error string. * iconv/loop.c: Fix comment. --- elf/rtld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'elf/rtld.c') diff --git a/elf/rtld.c b/elf/rtld.c index 68c516d4bc..1db96999ea 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -506,7 +506,8 @@ of this helper program; chances are you did not intend to run this program.\n\ (void) _dl_catch_error (&objname, &err_str, map_doit, &args); if (__builtin_expect (err_str != NULL, 0)) { - free ((char *) err_str); + if (err_str != _dl_out_of_memory) + free ((char *) err_str); _exit (EXIT_FAILURE); } } -- cgit v1.2.3