Merge pull request #2525 from jesven/fix_dlopen

fix dlmodule_load(): return immediately when open file fail
This commit is contained in:
Bernard Xiong 2019-04-01 18:11:13 +08:00 committed by GitHub
commit cfb4a9c323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -442,6 +442,10 @@ struct rt_dlmodule* dlmodule_load(const char* filename)
close(fd);
fd = -1;
}
else
{
goto __exit;
}
/* check ELF header */
if (rt_memcmp(elf_module->e_ident, RTMMAG, SELFMAG) != 0 &&