mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 13:30:45 +00:00
link.Elf: fix double free of header in parseDso
This commit is contained in:
parent
e567abb339
commit
861df93768
@ -1506,10 +1506,7 @@ fn parseDso(
|
||||
const soname = header.soname() orelse dso.path.basename();
|
||||
|
||||
const gop = try shared_objects.getOrPut(gpa, soname);
|
||||
if (gop.found_existing) {
|
||||
header.deinit(gpa);
|
||||
return;
|
||||
}
|
||||
if (gop.found_existing) return;
|
||||
errdefer _ = shared_objects.pop();
|
||||
|
||||
const index: File.Index = @intCast(try files.addOne(gpa));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user