mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-20 06:20:20 +02:00
check pthread_atfork return value
This commit is contained in:
parent
0e2bc8a1cf
commit
19c46d16f1
1 changed files with 3 additions and 1 deletions
4
malloc.c
4
malloc.c
|
@ -602,7 +602,9 @@ COLD static void init_slow_path(void) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_atfork(pre_fork, post_fork_parent, post_fork_child);
|
if (pthread_atfork(pre_fork, post_fork_parent, post_fork_child)) {
|
||||||
|
fatal_error("pthread_atfork failed");
|
||||||
|
}
|
||||||
|
|
||||||
struct random_state rng;
|
struct random_state rng;
|
||||||
random_state_init(&rng);
|
random_state_init(&rng);
|
||||||
|
|
Loading…
Add table
Reference in a new issue