Skip to content

Commit be6cb0f

Browse files
terminal: fix test w/ freed config
this test previously didn't fail when accessing freed members of config because deiniting `command_arena` was a no-op; `command_arena` was derived from `arena`, which allocated memory after `command_arena` was created/used
1 parent e7c1b4d commit be6cb0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/termio/Exec.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ test "execCommand: direct command, config freed" {
16981698
defer arena.deinit();
16991699
const alloc = arena.allocator();
17001700

1701-
var command_arena = ArenaAllocator.init(alloc);
1701+
var command_arena = ArenaAllocator.init(testing.allocator);
17021702
const command_alloc = command_arena.allocator();
17031703
const command = try (configpkg.Command{
17041704
.direct = &.{

0 commit comments

Comments
 (0)