about summary refs log tree commit diff
diff options
context:
space:
mode:
authorShuo Wang <wangshuo47@huawei.com>2020-11-24 16:42:18 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-11-24 16:54:58 -0300
commitdf5f473ed5ee95e3179fcb239e33e971619626cd (patch)
tree24da26e2b37eeab9fcb916e1921d18328a0d82bc
parent1e0a7fd0997ad5454d3fee480ceb392c4b49c064 (diff)
downloadglibc-df5f473ed5ee95e3179fcb239e33e971619626cd.tar.gz
glibc-df5f473ed5ee95e3179fcb239e33e971619626cd.tar.xz
glibc-df5f473ed5ee95e3179fcb239e33e971619626cd.zip
elf: Fix uninitialized variable for _dl_write
Variable ret in elf/dl-write.c is uninitialized, which should get
return value from __writev.
-rw-r--r--elf/dl-write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-write.c b/elf/dl-write.c
index 7350aff003..9b741c8a8f 100644
--- a/elf/dl-write.c
+++ b/elf/dl-write.c
@@ -41,7 +41,7 @@ _dl_write (int fd, const void *buffer, size_t length)
   else
     {
       __rtld_lock_lock_recursive (GL(dl_load_lock));
-      __writev (fd, &iov, 1);
+      ret = __writev (fd, &iov, 1);
       if (ret < 0)
         ret = -errno;
       __rtld_lock_unlock_recursive (GL(dl_load_lock));