std: Fix error in tlcsprng init sequence
The fallback case was actually switched with the success one.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user