elf: Fix uninitialized variable for _dl_write

Variable ret in elf/dl-write.c is uninitialized, which should get
return value from __writev.
This commit is contained in:
Shuo Wang 2020-11-24 16:42:18 -03:00 committed by Adhemerval Zanella
parent 1e0a7fd099
commit df5f473ed5

View File

@ -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));