summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-04-28 10:59:55 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-04-28 10:59:55 +0000
commit67a74f49c5e5b40d5ff511169cbdd5c9f7ae5205 (patch)
tree5fc9bb6de23a8a7f35b0f42112f1ddc4fe592d84
parentbc9f2a6cb195d9fd16c0d180c5077b63595d1c79 (diff)
parent3d0d3e99c0335b94fa41fafce6d0fb3fedb07f75 (diff)
Merge "opengl: fix resource leak when dlsym failed"
-rw-r--r--opengl/libs/EGL/egl_angle_platform.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl_angle_platform.cpp b/opengl/libs/EGL/egl_angle_platform.cpp
index d38f2eff01..c0ead5096f 100644
--- a/opengl/libs/EGL/egl_angle_platform.cpp
+++ b/opengl/libs/EGL/egl_angle_platform.cpp
@@ -145,6 +145,7 @@ bool initializeAnglePlatform(EGLDisplay dpy) {
if (!angleGetDisplayPlatform) {
ALOGE("dlsym lookup of ANGLEGetDisplayPlatform in libEGL_angle failed!");
+ dlclose(so);
return false;
}
@@ -155,6 +156,7 @@ bool initializeAnglePlatform(EGLDisplay dpy) {
if (!((angleGetDisplayPlatform)(dpy, g_PlatformMethodNames, g_NumPlatformMethods, nullptr,
&platformMethods))) {
ALOGE("ANGLEGetDisplayPlatform call failed!");
+ dlclose(so);
return false;
}
if (platformMethods) {