diff --git a/Modules/opengl/opengl.cpp b/Modules/opengl/opengl.cpp --- a/Modules/opengl/opengl.cpp +++ b/Modules/opengl/opengl.cpp @@ -701,6 +701,7 @@ if (!ctx) { qDebug() << "Error: glXCreateContext failed\n"; XDestroyWindow(dpy, win); + XFree(visinfo); return result; } @@ -730,6 +731,8 @@ glXDestroyContext(dpy, ctx); XDestroyWindow(dpy, win); + XFree(visinfo); + return result; } #endif