diff options
Diffstat (limited to 'src/ninep/cols.zig')
| -rw-r--r-- | src/ninep/cols.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig index 5218b937..c8d84e5d 100644 --- a/src/ninep/cols.zig +++ b/src/ninep/cols.zig @@ -124,8 +124,8 @@ pub fn applyTruncation(p: *Pardes, serial: ?u32) void { fn clear(p: *Pardes, serial: ?u32) tree.Status { const t = (header(p, serial) orelse return .err).text; - const empty = p.gpa.alloc(u8, 0) catch return .err; - t.remember(p.gpa, if (t.own) |own| .{ .text = own } else null); + t.remember(p.gpa, if (t.own) |own| .{ .text = own } else null) catch return .err; + const empty = p.gpa.alloc(u8, 0) catch unreachable; // no byte: the allocator is not asked if (t.own) |own| p.gpa.free(own); t.own = empty; t.cur_row = 0; |
