LibELF: Close dynamic objects after mapping and linking them

Oops, we were leaving the file descriptors open.
This commit is contained in:
Andreas Kling 2021-02-01 20:09:15 +01:00
parent 02520f16e3
commit 1d394b8a76
Notes: sideshowbarker 2024-07-18 22:38:47 +09:00

View file

@ -88,6 +88,7 @@ DynamicLoader::DynamicLoader(int fd, String filename, void* data, size_t size)
DynamicLoader::~DynamicLoader()
{
munmap(m_file_data, m_file_size);
close(m_image_fd);
}
const DynamicObject& DynamicLoader::dynamic_object() const