mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
Fix file descriptor leak in fs.openFileZ.
This commit is contained in:
parent
50ba018223
commit
ecdd636605
@ -752,6 +752,7 @@ pub const Dir = struct {
|
||||
try std.event.Loop.instance.?.openatZ(self.fd, sub_path, os_flags, 0)
|
||||
else
|
||||
try os.openatZ(self.fd, sub_path, os_flags, 0);
|
||||
errdefer os.close(fd);
|
||||
|
||||
if (!has_flock_open_flags and flags.lock != .None) {
|
||||
// TODO: integrate async I/O
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user