Free the GLX framebuffer configurations
Adds missing XFree for a glXChooseFBConfig Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I4c30341f90666170dac5d90b0c65d1deff4e0818 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
3bffd2e01b
commit
da898fca02
@ -395,14 +395,19 @@ QGLXContext::QGLXContext(Display *display, GLXContext context, void *visualInfo,
|
||||
int numConfigs = 0;
|
||||
static const int attribs[] = { GLX_FBCONFIG_ID, configId, None };
|
||||
configs = glXChooseFBConfig(m_display, screenNumber, attribs, &numConfigs);
|
||||
if (!configs || numConfigs < 1) {
|
||||
if (!configs) {
|
||||
qWarning("QGLXContext: Failed to find config(invalid arguments for glXChooseFBConfig)");
|
||||
return;
|
||||
} else if (numConfigs < 1) {
|
||||
qWarning("QGLXContext: Failed to find config");
|
||||
XFree(configs);
|
||||
return;
|
||||
}
|
||||
if (configs && numConfigs > 1) // this is suspicious so warn but let it continue
|
||||
qWarning("QGLXContext: Multiple configs for FBConfig ID %d", configId);
|
||||
|
||||
m_config = configs[0];
|
||||
XFree(configs);
|
||||
}
|
||||
|
||||
Q_ASSERT(vinfo || m_config);
|
||||
|
Loading…
Reference in New Issue
Block a user