From 7308faad36e7117791d8597b302e36ce1897e200 Mon Sep 17 00:00:00 2001 From: "Caleb J. Gardner" Date: Thu, 5 Mar 2026 12:54:25 -0600 Subject: [PATCH] Moved kv free's in setMetadata --- src/inode.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inode.zig b/src/inode.zig index 58687b8..bc96ded 100644 --- a/src/inode.zig +++ b/src/inode.zig @@ -172,13 +172,13 @@ pub fn setMetadata(self: Inode, alloc: std.mem.Allocator, tables: *Tables, fil: defer alloc.free(xattrs); for (xattrs) |kv| { const res = std.os.linux.fsetxattr(fil.handle, kv.key[0.. :0], kv.value.ptr, kv.value.len, 0); + alloc.free(kv.key); + alloc.free(kv.value); if (res != 0) { if (options.verbose) options.verbose_writer.?.print("fsetxattr has result of: {}\n", .{res}) catch {}; return error.SetXattr; } - alloc.free(kv.key); - alloc.free(kv.value); } } }