diff --git a/libc/upstream-dlmalloc/malloc.c b/libc/upstream-dlmalloc/malloc.c index d951841ee..3ef9b61a6 100644 --- a/libc/upstream-dlmalloc/malloc.c +++ b/libc/upstream-dlmalloc/malloc.c @@ -3193,11 +3193,11 @@ static int init_mparams(void) { RELEASE_MALLOC_GLOBAL_LOCK(); /* BEGIN android-added: move pthread_atfork outside of lock */ -#if LOCK_AT_FORK if (first_run != 0) { +#if LOCK_AT_FORK pthread_atfork(&pre_fork, &post_fork_parent, &post_fork_child); - } #endif + } /* END android-added */ return 1; }