diff options
| author | Bernard Xiong <[email protected]> | 2019-04-01 18:11:13 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-04-01 18:11:13 +0800 |
| commit | cfb4a9c32390d0564dd31150b6c73fb562f7c2aa (patch) | |
| tree | 9ce714c3e78ec65c0160ac29cc95f669ef712d61 /components | |
| parent | 2c8fb7022ebfbfcbe4da1560f276636aa43a91ba (diff) | |
| parent | 832fc23b02eb762ee99aa3dcdfd587e18f30dff8 (diff) | |
Merge pull request #2525 from jesven/fix_dlopen
fix dlmodule_load(): return immediately when open file fail
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/libdl/dlmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/libc/libdl/dlmodule.c b/components/libc/libdl/dlmodule.c index 0029c01728..14cbfe4cfb 100644 --- a/components/libc/libdl/dlmodule.c +++ b/components/libc/libdl/dlmodule.c @@ -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 && |
