mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
Fixed leak of XVisualInfo objects during GlxContext creation.
This commit is contained in:
parent
7c0f534877
commit
ae23cb39ba
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user