* libelf/elf_readall.c (__libelf_readall): Move rwlock_unlock
before libelf_acquire_all.
Signed-off-by: Heather S. McIntyre <hsm2@rice.edu>
Signed-off-by: Mark Wielaard <mark@klomp.org>
/* If this is an archive and we have derived descriptors get the
locks for all of them. */
+ rwlock_unlock(elf->lock); // lock will be reacquired next line
libelf_acquire_all (elf);
if (elf->maximum_size == ~((size_t) 0))
__libelf_seterrno (ELF_E_NOMEM);
/* Free the locks on the children. */
- libelf_release_all (elf);
+ libelf_release_all (elf); // lock is released
}
- rwlock_unlock (elf->lock);
-
return (char *) elf->map_address;
}