x11: Free XVisualInfo after use

Fixes #473
This commit is contained in:
Rob Loach 2022-07-09 17:18:15 -04:00
parent 11d8acfd4f
commit 7597cc7a09
No known key found for this signature in database
GPG Key ID: 627C60834A74A21A
2 changed files with 2 additions and 0 deletions

View File

@ -172,6 +172,7 @@ int main(void)
glXGetFBConfigAttrib(win.dpy, fbc[i], GLX_SAMPLES, &samples);
if ((fb_best < 0) || (sample_buffer && samples > best_num_samples))
fb_best = i, best_num_samples = samples;
XFree(vi);
}
}
win.fbc = fbc[fb_best];

View File

@ -170,6 +170,7 @@ int main(void)
glXGetFBConfigAttrib(win.dpy, fbc[i], GLX_SAMPLES, &samples);
if ((fb_best < 0) || (sample_buffer && samples > best_num_samples))
fb_best = i, best_num_samples = samples;
XFree(vi);
}
}
win.fbc = fbc[fb_best];