Skip to content

Commit

Permalink
stage2: add some missing deallocations in Compilation.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
FireFox317 committed Jan 3, 2021
1 parent 3c05c60 commit 7e5aaca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Compilation.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,7 @@ pub fn destroy(self: *Compilation) void {

const gpa = self.gpa;
self.work_queue.deinit();
self.c_object_work_queue.deinit();

{
var it = self.crt_files.iterator();
Expand Down Expand Up @@ -1202,6 +1203,10 @@ pub fn destroy(self: *Compilation) void {
crt_file.deinit(gpa);
}

if (self.glibc_so_files) |*glibc_file| {
glibc_file.deinit(gpa);
}

for (self.c_object_table.items()) |entry| {
entry.key.destroy(gpa);
}
Expand Down

0 comments on commit 7e5aaca

Please sign in to comment.