diff options
| author | 2023-04-28 10:59:55 +0000 | |
|---|---|---|
| committer | 2023-04-28 10:59:55 +0000 | |
| commit | 67a74f49c5e5b40d5ff511169cbdd5c9f7ae5205 (patch) | |
| tree | 5fc9bb6de23a8a7f35b0f42112f1ddc4fe592d84 | |
| parent | bc9f2a6cb195d9fd16c0d180c5077b63595d1c79 (diff) | |
| parent | 3d0d3e99c0335b94fa41fafce6d0fb3fedb07f75 (diff) | |
Merge "opengl: fix resource leak when dlsym failed"
| -rw-r--r-- | opengl/libs/EGL/egl_angle_platform.cpp | 2 |
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) { |