Merge "Stop using grep -P."
diff --git a/libc/bionic/jemalloc_wrapper.cpp b/libc/bionic/jemalloc_wrapper.cpp
index bf0494d..7d04457 100644
--- a/libc/bionic/jemalloc_wrapper.cpp
+++ b/libc/bionic/jemalloc_wrapper.cpp
@@ -107,9 +107,8 @@
     // clear the caches of other threads.
     // This must be done first so that cleared allocations get purged
     // in the next calls.
-    if (je_mallctl("thread.tcache.flush", nullptr, nullptr, nullptr, 0) != 0) {
-      return 0;
-    }
+    // Ignore the return call since this will fail if the tcache is disabled.
+    je_mallctl("thread.tcache.flush", nullptr, nullptr, nullptr, 0);
 
     unsigned narenas;
     size_t sz = sizeof(unsigned);
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 9bb6557..55d684f 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -4082,10 +4082,10 @@
   return namespaces;
 }
 
-// return /apex/<name>/etc/ld.config.txt from /apex/<name>/bin/<exec>
+// return /apex/<name>/etc/ld.config.txt from /apex/<name>/bin/*
 static std::string get_ld_config_file_apex_path(const char* executable_path) {
   std::vector<std::string> paths = android::base::Split(executable_path, "/");
-  if (paths.size() == 5 && paths[1] == "apex" && paths[3] == "bin") {
+  if (paths.size() >= 5 && paths[1] == "apex" && paths[3] == "bin") {
     return std::string("/apex/") + paths[2] + "/etc/ld.config.txt";
   }
   return "";