diff options
| author | shaojinchun <[email protected]> | 2019-03-31 14:24:58 +0800 |
|---|---|---|
| committer | shaojinchun <[email protected]> | 2019-03-31 14:24:58 +0800 |
| commit | 832fc23b02eb762ee99aa3dcdfd587e18f30dff8 (patch) | |
| tree | 08f87c77ee846ca5dea8b69540d1cab1a33b0135 /components/libc | |
| parent | fc5cfe0a5e5709878f50b904df7c3355078941dd (diff) | |
fix dlmodule_load(): return immediately when open file fail
Diffstat (limited to 'components/libc')
| -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 && |
