Skip to content

Commit 20f279c

Browse files
committed
Merge pull request #106345 from bruvzg/gl_leak
[X11] Fix GL init memory leak when transparency is enabled.
2 parents 29f13d8 + a12503b commit 20f279c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

platform/linuxbsd/x11/gl_manager_x11.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ Error GLManager_X11::_create_context(GLDisplay &gl_display) {
137137
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
138138

139139
for (int i = 0; i < fbcount; i++) {
140+
if (vi) {
141+
XFree(vi);
142+
vi = nullptr;
143+
}
140144
vi = (XVisualInfo *)glXGetVisualFromFBConfig(x11_display, fbc[i]);
141145
if (!vi) {
142146
continue;

0 commit comments

Comments
 (0)