fixing memory leak
Some checks failed
Build / build (push) Successful in 2m13s
Test / build_and_test (push) Failing after 25m3s

This commit is contained in:
2026-01-08 14:17:49 +01:00
parent 4f7b319a43
commit 87c6a66a2f
3 changed files with 4 additions and 3 deletions

View File

@@ -68,8 +68,9 @@ pub const LogVerboseLevel = enum {
};
pub inline fn getLogVerboseLevel() LogVerboseLevel {
const allocator = std.heap.page_allocator;
const allocator = std.heap.c_allocator;
const level = std.process.getEnvVarOwned(allocator, DRIVER_LOGS_ENV_NAME) catch return .None;
defer allocator.free(level);
return if (std.mem.eql(u8, level, "none"))
.None
else if (std.mem.eql(u8, level, "all"))