Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 632f142c authored by Pete Bentley's avatar Pete Bentley
Browse files

Propagate dlopen errors to callers of OpenNativeLibrary.

Bug: 119867084
Test: make && flashall
Change-Id: If98082db39796f0097ce7ef1d095c9f202c3a95e
parent 8fd4435d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -639,7 +639,11 @@ void* OpenNativeLibrary(JNIEnv* env,
  UNUSED(target_sdk_version);
  if (class_loader == nullptr) {
    *needs_native_bridge = false;
    return dlopen(path, RTLD_NOW);
    void* handle = dlopen(path, RTLD_NOW);
    if (handle == nullptr) {
      *error_msg = dlerror();
    }
    return handle;
  }

  std::lock_guard<std::mutex> guard(g_namespaces_mutex);