Skip to content

Commit 0bbb7e7

Browse files
address memory leak (#10)
1 parent e7f3d22 commit 0bbb7e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils.zig

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ pub const FileFinder = struct {
6262
} else {
6363
// Not Found, try the parent dir
6464
if (std.fs.path.dirname(dirname)) |parent| {
65+
allocator.free(path); // situation not captured by errdefer
6566
return Self.recursiveFind(allocator, parent, filename);
6667
} else {
6768
return std.fs.File.OpenError.FileNotFound;

0 commit comments

Comments
 (0)