Commit 660eba9a by Nicolas Capens Committed by Nicolas Capens

Fix thread-local storage memory leak.

eglReleaseThread() was leaking some memory because even though it deletes the 'current' thread state, it was inadvertently getting re-allocated when recording the success error state. Change-Id: I92efb1b34e62a21998b4fc19aaeba6473b06548b Reviewed-on: https://swiftshader-review.googlesource.com/11968Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 69674fb1
...@@ -488,7 +488,7 @@ EGLBoolean ReleaseThread(void) ...@@ -488,7 +488,7 @@ EGLBoolean ReleaseThread(void)
detachThread(); detachThread();
return success(EGL_TRUE); return EGL_TRUE; // success() is not called here because it would re-allocate thread-local storage.
} }
EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
......
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