fix: more test fixes

This commit is contained in:
CJ van den Berg 2026-02-26 14:47:38 +01:00
parent 20c167b37d
commit 9679b0cedf
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 2 additions and 2 deletions

View file

@ -494,7 +494,7 @@ const KQueueBackend = struct {
self.watches.deinit(allocator); self.watches.deinit(allocator);
var sit = self.snapshots.iterator(); var sit = self.snapshots.iterator();
while (sit.next()) |entry| { while (sit.next()) |entry| {
allocator.free(entry.key_ptr.*); // Keys are borrowed from self.watches and freed in the watches loop above.
var names = entry.value_ptr.*; var names = entry.value_ptr.*;
var nit = names.iterator(); var nit = names.iterator();
while (nit.next()) |ne| allocator.free(ne.key_ptr.*); while (nit.next()) |ne| allocator.free(ne.key_ptr.*);

View file

@ -148,7 +148,7 @@ fn makeTempDir(allocator: std.mem.Allocator) ![]u8 {
const name = try std.fmt.allocPrint( const name = try std.fmt.allocPrint(
allocator, allocator,
"/tmp/nightwatch_test_{d}_{d}", "/tmp/nightwatch_test_{d}_{d}",
.{ std.os.linux.getpid(), n }, .{ std.c.getpid(), n },
); );
errdefer allocator.free(name); errdefer allocator.free(name);
try std.fs.makeDirAbsolute(name); try std.fs.makeDirAbsolute(name);