mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 23:15:16 +00:00
Fix wasi implementation issues (#1078)
Fix args_get and environ_get issues in libc-wasi and libc-uvwasi implementation.
This commit is contained in:
parent
fd9cce0eef
commit
4864302a1f
|
@ -112,7 +112,6 @@ wasi_args_get(wasm_exec_env_t exec_env, uint32 *argv_offsets, char *argv_buf)
|
|||
|
||||
for (i = 0; i < argc; i++)
|
||||
argv_offsets[i] = addr_native_to_app(argv[i]);
|
||||
argv_offsets[argc] = 0;
|
||||
|
||||
wasm_runtime_free(argv);
|
||||
return 0;
|
||||
|
@ -208,7 +207,6 @@ wasi_environ_get(wasm_exec_env_t exec_env, uint32 *environ_offsets,
|
|||
|
||||
for (i = 0; i < environ_count; i++)
|
||||
environ_offsets[i] = addr_native_to_app(environs[i]);
|
||||
environ_offsets[environ_count] = 0;
|
||||
|
||||
wasm_runtime_free(environs);
|
||||
return 0;
|
||||
|
|
|
@ -131,7 +131,6 @@ wasi_args_get(wasm_exec_env_t exec_env, uint32 *argv_offsets, char *argv_buf)
|
|||
|
||||
for (i = 0; i < argc; i++)
|
||||
argv_offsets[i] = addr_native_to_app(argv[i]);
|
||||
argv_offsets[argc] = 0;
|
||||
|
||||
wasm_runtime_free(argv);
|
||||
return 0;
|
||||
|
@ -234,7 +233,6 @@ wasi_environ_get(wasm_exec_env_t exec_env, uint32 *environ_offsets,
|
|||
|
||||
for (i = 0; i < environ_count; i++)
|
||||
environ_offsets[i] = addr_native_to_app(environs[i]);
|
||||
environ_offsets[environ_count] = 0;
|
||||
|
||||
wasm_runtime_free(environs);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user