macho: fix double free

This commit is contained in:
Jakub Konka 2024-03-28 21:15:22 +01:00 committed by Andrew Kelley
parent 3661133f98
commit fda9a32fef

View File

@ -1290,7 +1290,7 @@ fn parseDependentDylibs(self: *MachO) !void {
}
try umbrella.rpaths.ensureUnusedCapacity(gpa, dep_dylib.rpaths.keys().len);
for (dep_dylib.rpaths.keys()) |rpath| {
umbrella.rpaths.putAssumeCapacity(rpath, {});
umbrella.rpaths.putAssumeCapacity(try gpa.dupe(u8, rpath), {});
}
}
} else {