[PATCH xserver 1/5] glx: Be a bit more paranoid in glx client cleanup

Adam Jackson ajax at redhat.com
Wed Aug 30 18:58:24 UTC 2017


This would probably crash (via double-free) if you had multiple GPUs and
an indirect context.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/glxext.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/glx/glxext.c b/glx/glxext.c
index 9b4d816414..d39fe6d8e0 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -293,6 +293,7 @@ glxClientCallback(CallbackListPtr *list, void *closure, void *data)
         free(cl->returnBuf);
         free(cl->largeCmdBuf);
         free(cl->GLClientextensions);
+        memset(cl, 0, sizeof(*cl));
         break;
 
     default:
-- 
2.13.5



More information about the xorg-devel mailing list