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 7c0f534877
commit ae23cb39ba

View File

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