Elf: fix invalid free of path field

It's now arena-allocated so no need to free it with gpa
This commit is contained in:
Andrew Kelley
2023-12-16 13:48:43 -07:00
parent e3409c0bce
commit b1fc3fe1c4

View File

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