mirror of
https://github.com/ziglang/zig.git
synced 2025-12-31 02:23:22 +00:00
Prevent double file close in MachO linking
This commit is contained in:
parent
0c520cd32d
commit
a2582df5b2
@ -256,7 +256,10 @@ pub fn openPath(allocator: *Allocator, sub_path: []const u8, options: link.Optio
|
||||
errdefer file.close();
|
||||
|
||||
const self = try createEmpty(allocator, options);
|
||||
errdefer self.base.destroy();
|
||||
errdefer {
|
||||
self.base.file = null;
|
||||
self.base.destroy();
|
||||
}
|
||||
|
||||
self.base.file = file;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user