| ... | @@ -256,7 +256,10 @@ pub fn openPath(allocator: *Allocator, sub_path: []const u8, options: link.Optio | ... | @@ -256,7 +256,10 @@ pub fn openPath(allocator: *Allocator, sub_path: []const u8, options: link.Optio |
| 256 | errdefer file.close(); | 256 | errdefer file.close(); |
| 257 | | 257 | |
| 258 | const self = try createEmpty(allocator, options); | 258 | const self = try createEmpty(allocator, options); |
| 259 | errdefer self.base.destroy(); | 259 | errdefer { |
| | 260 | self.base.file = null; |
| | 261 | self.base.destroy(); |
| | 262 | } |
| 260 | | 263 | |
| 261 | self.base.file = file; | 264 | self.base.file = file; |
| 262 | | 265 | |