e354a5
commit df5f473ed5ee95e3179fcb239e33e971619626cd
e354a5
Author: Shuo Wang <wangshuo47@huawei.com>
e354a5
Date:   Tue Nov 24 16:42:18 2020 -0300
e354a5
e354a5
    elf: Fix uninitialized variable for _dl_write
e354a5
    
e354a5
    Variable ret in elf/dl-write.c is uninitialized, which should get
e354a5
    return value from __writev.
e354a5
e354a5
diff --git a/elf/dl-write.c b/elf/dl-write.c
e354a5
index 7350aff0035d4fbc..9b741c8a8fe12f6c 100644
e354a5
--- a/elf/dl-write.c
e354a5
+++ b/elf/dl-write.c
e354a5
@@ -41,7 +41,7 @@ _dl_write (int fd, const void *buffer, size_t length)
e354a5
   else
e354a5
     {
e354a5
       __rtld_lock_lock_recursive (GL(dl_load_lock));
e354a5
-      __writev (fd, &iov, 1);
e354a5
+      ret = __writev (fd, &iov, 1);
e354a5
       if (ret < 0)
e354a5
         ret = -errno;
e354a5
       __rtld_lock_unlock_recursive (GL(dl_load_lock));