| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | //! Think about this as fake in-memory Object file for the Zig module. | 4 | //! Think about this as fake in-memory Object file for the Zig module. |
| 5 | | 5 | |
| 6 | data: std.ArrayListUnmanaged(u8) = .{}, | 6 | data: std.ArrayListUnmanaged(u8) = .{}, |
| | 7 | /// Externally owned memory. |
| 7 | path: []const u8, | 8 | path: []const u8, |
| 8 | index: File.Index, | 9 | index: File.Index, |
| 9 | | 10 | |
| ... | @@ -109,7 +110,6 @@ pub fn init(self: *ZigObject, elf_file: *Elf) !void { | ... | @@ -109,7 +110,6 @@ pub fn init(self: *ZigObject, elf_file: *Elf) !void { |
| 109 | | 110 | |
| 110 | pub fn deinit(self: *ZigObject, allocator: Allocator) void { | 111 | pub fn deinit(self: *ZigObject, allocator: Allocator) void { |
| 111 | self.data.deinit(allocator); | 112 | self.data.deinit(allocator); |
| 112 | allocator.free(self.path); | | |
| 113 | self.local_esyms.deinit(allocator); | 113 | self.local_esyms.deinit(allocator); |
| 114 | self.global_esyms.deinit(allocator); | 114 | self.global_esyms.deinit(allocator); |
| 115 | self.strtab.deinit(allocator); | 115 | self.strtab.deinit(allocator); |