about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c3
1 files changed, 2 insertions, 1 deletions
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);
 	    }
 	}