| ... | @@ -93,9 +93,12 @@ pub const JobQueue = struct { | ... | @@ -93,9 +93,12 @@ pub const JobQueue = struct { |
| 93 | /// Dumps all subsequent error bundles into the first one. | 93 | /// Dumps all subsequent error bundles into the first one. |
| 94 | pub fn consolidateErrors(jq: *JobQueue) !void { | 94 | pub fn consolidateErrors(jq: *JobQueue) !void { |
| 95 | const root = &jq.all_fetches.items[0].error_bundle; | 95 | const root = &jq.all_fetches.items[0].error_bundle; |
| | 96 | const gpa = root.gpa; |
| 96 | for (jq.all_fetches.items[1..]) |fetch| { | 97 | for (jq.all_fetches.items[1..]) |fetch| { |
| 97 | if (fetch.error_bundle.root_list.items.len > 0) { | 98 | if (fetch.error_bundle.root_list.items.len > 0) { |
| 98 | try root.addBundleAsRoots(fetch.error_bundle.tmpBundle()); | 99 | var bundle = try fetch.error_bundle.toOwnedBundle(""); |
| | 100 | defer bundle.deinit(gpa); |
| | 101 | try root.addBundleAsRoots(bundle); |
| 99 | } | 102 | } |
| 100 | } | 103 | } |
| 101 | } | 104 | } |