fix(macos): fix segmentation fault

This commit is contained in:
utox39
2025-03-13 02:04:52 +01:00
parent 1f53298b31
commit 4db102c08c

View File

@@ -355,7 +355,6 @@ pub fn getOsInfo(allocator: std.mem.Allocator) ![]u8 {
// Second call to sysctlbyname to get the os version // Second call to sysctlbyname to get the os version
if (c_sysctl.sysctlbyname("kern.osproductversion", os_version.ptr, &size, null, 0) != 0) { if (c_sysctl.sysctlbyname("kern.osproductversion", os_version.ptr, &size, null, 0) != 0) {
allocator.free(os_version);
return error.FailedToGetOsVersion; return error.FailedToGetOsVersion;
} }