From 243802e713968c00f435f83aa0b635ba2ab7d54d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 19 Mar 2025 18:48:28 -0400 Subject: [PATCH] Close file descriptor --- stdlib/paths.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/paths.c b/stdlib/paths.c index cba8311..8dfef08 100644 --- a/stdlib/paths.c +++ b/stdlib/paths.c @@ -280,6 +280,7 @@ static void _write(Path_t path, Array_t bytes, int mode, int permissions) ssize_t written = write(fd, bytes.data, (size_t)bytes.length); if (written != (ssize_t)bytes.length) fail("Could not write to file: %s\n%s", path_str, strerror(errno)); + close(fd); } public void Path$write(Path_t path, Text_t text, int permissions)