| author | |
| committer | |
| log | cb115cf73a986ab3f246628a332d06c0deb8feda |
| tree | 4f701b7ff26b37a616b48094325d10134095b1fc |
| parent | be9649f4ea5a32fdb5b5ce6488a6ae7d30f3acb0 |
1 files changed, 3 insertions(+), 0 deletions(-)
lib/std/process.zig+3| ... | ... | @@ -690,6 +690,9 @@ pub const ArgIteratorWasi = struct { |
| 690 | 690 | |
| 691 | 691 | /// Call to free the internal buffer of the iterator. |
| 692 | 692 | pub fn deinit(self: *ArgIteratorWasi) void { |
| 693 | // Nothing is allocated when there are no args | |
| 694 | if (self.args.len == 0) return; | |
| 695 | ||
| 693 | 696 | const last_item = self.args[self.args.len - 1]; |
| 694 | 697 | const last_byte_addr = @intFromPtr(last_item.ptr) + last_item.len + 1; // null terminated |
| 695 | 698 | const first_item_ptr = self.args[0].ptr; |