Skip to content

Commit 50d92d3

Browse files
committed
Add failing branch to malloc check
Signed-off-by: Krisztian Szilvasi <[email protected]>
1 parent 08a8e0e commit 50d92d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/shared/platform/zephyr/zephyr_file.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,10 @@ os_renameat(os_file_handle old_handle, const char *old_path,
859859
BH_FREE(ptr->path);
860860
ptr->path = new_path_copy;
861861
}
862+
else {
863+
k_mutex_unlock(&desc_array_mutex);
864+
return __WASI_ENOMEM;
865+
}
862866
break; // Only one descriptor should match
863867
}
864868
}

0 commit comments

Comments
 (0)