mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 15:32:05 +00:00
libc-wasi: Fix a locking botch (#3437)
This commit is contained in:
parent
7949df96f4
commit
51ecfd6673
|
@ -650,8 +650,10 @@ fd_table_insert(wasm_exec_env_t exec_env, struct fd_table *ft,
|
|||
|
||||
__wasi_errno_t error = fd_table_unused(ft, out);
|
||||
|
||||
if (error != __WASI_ESUCCESS)
|
||||
if (error != __WASI_ESUCCESS) {
|
||||
rwlock_unlock(&ft->lock);
|
||||
return error;
|
||||
}
|
||||
|
||||
fd_table_attach(ft, *out, fo, rights_base, rights_inheriting);
|
||||
rwlock_unlock(&ft->lock);
|
||||
|
|
Loading…
Reference in New Issue
Block a user