chore: frees memory allocated for shell info

This commit is contained in:
utox39
2025-02-27 15:55:55 +01:00
parent 682f83b694
commit ff0ed75100

View File

@@ -26,6 +26,7 @@ pub fn main() !void {
const shell = try os_module.getShell(allocator); const shell = try os_module.getShell(allocator);
try stdout.print("Shell: {s}", .{shell}); try stdout.print("Shell: {s}", .{shell});
try bw.flush(); try bw.flush();
allocator.free(shell);
const cpu_info = try os_module.getCpuInfo(allocator); const cpu_info = try os_module.getCpuInfo(allocator);
try stdout.print("cpu: {s} ({})\n", .{ cpu_info.cpu_name, cpu_info.cpu_cores }); try stdout.print("cpu: {s} ({})\n", .{ cpu_info.cpu_name, cpu_info.cpu_cores });