Pass back error code from dlerror_run
authorUlrich Drepper <drepper@gmail.com>
Thu, 8 Sep 2011 03:50:40 +0000 (23:50 -0400)
committerUlrich Drepper <drepper@gmail.com>
Thu, 8 Sep 2011 03:50:40 +0000 (23:50 -0400)
ChangeLog
elf/dl-libc.c

index 7e77bc9..0d2580d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-09-07  Ulrich Drepper  <drepper@gmail.com>
 
+       * elf/dl-libc.c (dlerror_run): Pass back error code from
+       dl_catch_error.
+
        [BZ #13123]
        * elf/dl-load.c (lose): Free l_origin if it is valid.
 
index e440d01..828588a 100644 (file)
@@ -45,10 +45,10 @@ dlerror_run (void (*operate) (void *), void *args)
   const char *last_errstring = NULL;
   bool malloced;
 
-  (void) GLRO(dl_catch_error) (&objname, &last_errstring, &malloced,
-                              operate, args);
+  int result = (GLRO(dl_catch_error) (&objname, &last_errstring, &malloced,
+                                     operate, args)
+               ?: last_errstring != NULL);
 
-  int result = last_errstring != NULL;
   if (result && malloced)
     free ((char *) last_errstring);