diff --git a/Modules/opengl/opengl.cpp b/Modules/opengl/opengl.cpp --- a/Modules/opengl/opengl.cpp +++ b/Modules/opengl/opengl.cpp @@ -814,6 +814,7 @@ if (!ctx) { qDebug() << "Error: eglCreateContext failed\n"; XDestroyWindow(dpy, win); + XFree(visinfo); return result; } @@ -822,6 +823,7 @@ qDebug() << "Error: eglCreateWindowSurface failed\n"; eglDestroyContext(egl_dpy, ctx); XDestroyWindow(dpy, win); + XFree(visinfo); return result; } @@ -843,6 +845,7 @@ eglDestroyContext(egl_dpy, ctx); eglDestroySurface(egl_dpy, surf); XDestroyWindow(dpy, win); + XFree(visinfo); return result; }