aboutsummaryrefslogtreecommitdiff
path: root/stdlib/paths.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-21 21:17:42 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-21 21:17:42 -0400
commit515c620cf1ec86f436b86b198217a0fedc5e0b1a (patch)
tree2ab564e9f97171fa1eefd939b420759a111ca438 /stdlib/paths.c
parentc9cb7ccb40d99f54e35ec5068cb3cba0514bb45f (diff)
Close temp files
Diffstat (limited to 'stdlib/paths.c')
-rw-r--r--stdlib/paths.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stdlib/paths.c b/stdlib/paths.c
index 8dfef083..c7743759 100644
--- a/stdlib/paths.c
+++ b/stdlib/paths.c
@@ -527,6 +527,7 @@ public Path_t Path$write_unique_bytes(Path_t path, Array_t bytes)
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", buf, strerror(errno));
+ close(fd);
return Path$from_str(buf);
}