summaryrefslogtreecommitdiff
path: root/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libs/EGL/egl_layers.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/opengl/libs/EGL/egl_layers.cpp b/opengl/libs/EGL/egl_layers.cpp
index dd8fbfcb7d..f936ac0efd 100644
--- a/opengl/libs/EGL/egl_layers.cpp
+++ b/opengl/libs/EGL/egl_layers.cpp
@@ -375,12 +375,13 @@ void LayerLoader::LoadLayers() {
auto app_namespace = android::GraphicsEnv::getInstance().getAppNamespace();
if (app_namespace && !android::base::StartsWith(layer, kSystemLayerLibraryDir)) {
bool native_bridge = false;
- std::string error_message;
- handle = OpenNativeLibrary(app_namespace, layer.c_str(), &native_bridge,
- &error_message);
+ char* error_message = nullptr;
+ handle = OpenNativeLibraryInNamespace(
+ app_namespace, layer.c_str(), &native_bridge, &error_message);
if (!handle) {
ALOGE("Failed to load layer %s with error: %s", layer.c_str(),
- error_message.c_str());
+ error_message);
+ android::NativeLoaderFreeErrorMessage(error_message);
return;
}