Fixed leak of XVisualInfo objects during GlxContext creation.

This commit is contained in:
binary1248 2016-08-20 14:20:15 +02:00 committed by Lukas Dürrenberger
parent d9056ad5b3
commit 42146ea070

View File

@ -482,8 +482,11 @@ void GlxContext::createSurface(GlxContext* shared, unsigned int width, unsigned
if (visual->visualid == visualInfo.visualid) if (visual->visualid == visualInfo.visualid)
{ {
config = &configs[i]; config = &configs[i];
XFree(visual);
break; break;
} }
XFree(visual);
} }
if (config) if (config)
@ -640,8 +643,11 @@ void GlxContext::createContext(GlxContext* shared)
if (visual->visualid == visualInfo->visualid) if (visual->visualid == visualInfo->visualid)
{ {
config = &configs[i]; config = &configs[i];
XFree(visual);
break; break;
} }
XFree(visual);
} }
if (!config) if (!config)