mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +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)
|
||||
{
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user