summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xmesaP.h
diff options
context:
space:
mode:
authorJohn Sheu <[email protected]>2016-04-01 16:52:20 -0700
committerAlejandro Piñeiro <[email protected]>2016-04-15 07:45:28 +0200
commit781232e0ac48bf608757bbd270c593a90173f951 (patch)
tree2b9ca9e4e11c50de00e0482220d1d915fb843001 /src/mesa/drivers/x11/xmesaP.h
parentfe9d8cd79e9380e29eb92f97903e8cb79d25371a (diff)
xlib: fix memory leak of and remove vishandle from XMesaVisualInfo
The vishandle member of XMesaVisualInfo is used to support the comparison of XVisualInfo instances by pointer value, in find_glx_visual(). The comparison however will always be false, as in every case the comparison is made, the VisualInfo instance being compared to is a new allocation passed in through a GLX API call. In addition, the XVisualInfo instance pointed to by vishandle is itself never freed, causing a memory leak. Since vishandle is essentially useless, we just remove it and thereby also fix the leak. Reviewed-by: Alejandro Piñeiro <[email protected]>
Diffstat (limited to 'src/mesa/drivers/x11/xmesaP.h')
-rw-r--r--src/mesa/drivers/x11/xmesaP.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h
index d7a934e8df4..6cd020f2ed3 100644
--- a/src/mesa/drivers/x11/xmesaP.h
+++ b/src/mesa/drivers/x11/xmesaP.h
@@ -78,7 +78,6 @@ struct xmesa_visual {
int screen, visualID;
int visualType;
XMesaVisualInfo visinfo; /* X's visual info (pointer to private copy) */
- XVisualInfo *vishandle; /* Only used in fakeglx.c */
GLint BitsPerPixel; /* True bits per pixel for XImages */
GLboolean ximage_flag; /* Use XImage for back buffer (not pixmap)? */