about summary refs log tree commit diff
path: root/elf/dl-libc.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-libc.c')
-rw-r--r--elf/dl-libc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-libc.c b/elf/dl-libc.c
index 38774e50a0..992a52e699 100644
--- a/elf/dl-libc.c
+++ b/elf/dl-libc.c
@@ -42,7 +42,7 @@ dlerror_run (void (*operate) (void *), void *args)
   (void) _dl_catch_error (&objname, &last_errstring, operate, args);
 
   result = last_errstring != NULL;
-  if (result)
+  if (result && last_errstring != _dl_out_of_memory)
     free ((char *) last_errstring);
 
   return result;