Skip to content

Commit 75b9716

Browse files
committed
recents: Fix memory leak with repeated recents
1 parent 949e0e4 commit 75b9716

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Recents.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub fn indexOfExport(self: *Self, path: [:0]const u8) ?usize {
5858

5959
pub fn appendFolder(self: *Self, path: [:0]const u8) !void {
6060
if (self.indexOfFolder(path)) |index| {
61+
pixi.state.allocator.free(path);
6162
const folder = self.folders.swapRemove(index);
6263
try self.folders.append(folder);
6364
} else {

0 commit comments

Comments
 (0)