diff --git a/lib/std/crypto/tlcsprng.zig b/lib/std/crypto/tlcsprng.zig index 8a2c24916b..1e39b125f6 100644 --- a/lib/std/crypto/tlcsprng.zig +++ b/lib/std/crypto/tlcsprng.zig @@ -107,13 +107,9 @@ fn tlsCsprngFill(_: *const std.rand.Random, buffer: []u8) void { break :wof; } else |_| {} - os.madvise( - wipe_mem.ptr, - wipe_mem.len, - os.MADV_WIPEONFORK, - ) catch { + if (os.madvise(wipe_mem.ptr, wipe_mem.len, os.MADV_WIPEONFORK)) |_| { return initAndFill(buffer); - }; + } else |_| {} } if (std.Thread.use_pthreads) {