Fix double initialization call.
The previous refactor left a double call to the initialization of
the loaded hooks. Remove the unnecessary call.
Bug: 129239269
Test: All unit tests pass. No double printing of init messages.
Change-Id: Ie980f2383c75d69f8b06bf9a431bb59caef21188
diff --git a/libc/bionic/malloc_common_dynamic.cpp b/libc/bionic/malloc_common_dynamic.cpp
index 40f497e..e12c247 100644
--- a/libc/bionic/malloc_common_dynamic.cpp
+++ b/libc/bionic/malloc_common_dynamic.cpp
@@ -328,13 +328,6 @@
return false;
}
- init_func_t init_func = reinterpret_cast<init_func_t>(gFunctions[FUNC_INITIALIZE]);
- if (!init_func(&__libc_malloc_default_dispatch, &gMallocLeakZygoteChild, options)) {
- error_log("%s: failed to enable malloc %s", getprogname(), prefix);
- ClearGlobalFunctions();
- return false;
- }
-
if (!FinishInstallHooks(globals, options, prefix)) {
dlclose(impl_handle);
return false;