diff options
author | John Sheu <[email protected]> | 2016-04-12 12:53:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-04-12 13:56:41 -0600 |
commit | 7f0854724827bd34b9e64ab0c9cabc328e404c62 (patch) | |
tree | 4f8d35d74c9a7bf4c7b21c252156181963c35576 /src/mesa/drivers/x11/fakeglx.c | |
parent | d04bb14d04d2f2f03cdaa3d78121d338a81de2e4 (diff) |
xlib: fix memory leak on Display close
The XMesaVisual instances freed in the visuals table on display close
are being freed with a free() call, instead of XMesaDestroyVisual(),
causing a memory leak.
Signed-off-by: John Sheu <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/drivers/x11/fakeglx.c')
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 80b71765e6c..2f4d966973e 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -794,7 +794,7 @@ destroy_visuals_on_display(Display *dpy) if (VisualTable[i]->display == dpy) { /* remove this visual */ int j; - free(VisualTable[i]); + XMesaDestroyVisual(VisualTable[i]); for (j = i; j < NumVisuals - 1; j++) VisualTable[j] = VisualTable[j + 1]; NumVisuals--; |