Commit 8a703e5a by Jamie Madill

Fix leaked resources in EGLThreadTest.

We were not calling eglTerminate to clean up. Change-Id: I022d8158c6dc041664d4b9c01295a67c9760b245 Reviewed-on: https://chromium-review.googlesource.com/256730Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent fc7fab72
......@@ -9,6 +9,7 @@ typedef EGLAPI EGLDisplay EGLAPIENTRY EGLGetDisplay(EGLNativeDisplayType display
typedef EGLAPI EGLBoolean EGLAPIENTRY EGLInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
typedef EGLAPI EGLContext EGLAPIENTRY EGLGetCurrentContext(void);
typedef EGLAPI EGLSurface EGLAPIENTRY EGLGetCurrentSurface(EGLint readdraw);
typedef EGLAPI EGLBoolean EGLAPIENTRY EGLTerminate(EGLDisplay dpy);
class EGLThreadTest : public testing::Test
{
......@@ -78,4 +79,7 @@ TEST_F(EGLThreadTest, thread_init_crash)
// crash, because the TLS value is NULL on main thread
mGetCurrentSurface(EGL_DRAW);
mGetCurrentContext();
}
\ No newline at end of file
auto terminate = (EGLTerminate *)GetProcAddress(mEGL, "eglTerminate");
terminate(mDisplay);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment