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