Commit d1355c3a authored by Michal Malý's avatar Michal Malý Committed by Albert Astals Cid

Do not leak XVisualInfo (GLX path)

Summary: XVisualInfo is not released by get_gl_info_glx()

Test Plan: Leak check with valgrind shows that visinfo is no longer leaking.

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6567
parent 5d022b43
......@@ -701,6 +701,7 @@ static QTreeWidgetItem *get_gl_info_glx(Display *dpy, int scrnum, Bool allowDire
if (!ctx) {
qDebug() << "Error: glXCreateContext failed\n";
XDestroyWindow(dpy, win);
XFree(visinfo);
return result;
}
......@@ -730,6 +731,8 @@ static QTreeWidgetItem *get_gl_info_glx(Display *dpy, int scrnum, Bool allowDire
glXDestroyContext(dpy, ctx);
XDestroyWindow(dpy, win);
XFree(visinfo);
return result;
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment