From a153a972adbe783bc8a0d08df0942a3bf0552188 Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 31 Dec 2019 15:35:17 -0300 Subject: [PATCH] io.test: close memfd at end of test --- lib/std/io/test.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/io/test.zig b/lib/std/io/test.zig index d6de912240..b572a7bf92 100644 --- a/lib/std/io/test.zig +++ b/lib/std/io/test.zig @@ -654,6 +654,7 @@ test "memfd_create" { if (builtin.os != .linux) return error.SkipZigTest; const fd = try std.os.memfd_create("test", 0); + defer std.os.close(fd); try std.os.write(fd, "test"); try std.os.lseek_SET(fd, 0);