From 94a29ca94a64be47ef9159724996e8241cf4ad6f Mon Sep 17 00:00:00 2001 From: Marcin Mielniczuk Date: Wed, 4 Mar 2020 18:12:37 +0100 Subject: [PATCH] Close the link --- crates/test-programs/wasi-tests/src/bin/path_link_nonstrict.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/test-programs/wasi-tests/src/bin/path_link_nonstrict.rs b/crates/test-programs/wasi-tests/src/bin/path_link_nonstrict.rs index fcc02da18ca3..1e3a06c0a8fb 100644 --- a/crates/test-programs/wasi-tests/src/bin/path_link_nonstrict.rs +++ b/crates/test-programs/wasi-tests/src/bin/path_link_nonstrict.rs @@ -91,6 +91,7 @@ unsafe fn test_path_link(dir_fd: wasi::Fd) { wasi::path_link(dir_fd, 0, "file", subdir_fd, "link").expect("creating a link in subdirectory"); link_fd = open_link(subdir_fd, "link"); check_rights(file_fd, link_fd); + wasi::fd_close(link_fd).expect("closing link_fd"); // NON-STRICT wasi::path_unlink_file(subdir_fd, "link").expect("removing a link"); wasi::path_remove_directory(dir_fd, "subdir").expect("removing subdir");