From 0ec0f00c23bc5e1173c815128feb68cffc3a881c Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Sat, 1 Nov 2025 22:17:02 +0200 Subject: [PATCH] glx: revert https://github.com/X11Libre/xserver/commit/cb85ceae2dd50fd6469a779f8ba6beb078de58ee This commit broke glx after server reset. Signed-off-by: stefan11111 --- dix/callback_priv.h | 1 - glx/vndext.c | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dix/callback_priv.h b/dix/callback_priv.h index f2042c5d55..64c4fbcce6 100644 --- a/dix/callback_priv.h +++ b/dix/callback_priv.h @@ -33,7 +33,6 @@ typedef struct _CallbackList { * * @param pcbl pointer to the list head (CallbackListPtr) */ -_X_EXPORT /* only for GLX module */ void DeleteCallbackList(CallbackListPtr *pcbl); #endif /* _XSERVER_CALLBACK_PRIV_H */ diff --git a/glx/vndext.c b/glx/vndext.c index a84a8149b3..cb5d6b6e8d 100644 --- a/glx/vndext.c +++ b/glx/vndext.c @@ -49,7 +49,8 @@ Bool noGlxExtension = FALSE; ExtensionEntry *GlxExtensionEntry; int GlxErrorBase = 0; -static CallbackListPtr vndInitCallbackListPtr = NULL; +static CallbackListRec vndInitCallbackList; +static CallbackListPtr vndInitCallbackListPtr = &vndInitCallbackList; static DevPrivateKeyRec glvXGLVScreenPrivKey; static DevPrivateKeyRec glvXGLVClientPrivKey; @@ -199,7 +200,11 @@ GLXReset(ExtensionEntry *extEntry) GlxMappingReset(); if ((dispatchException & DE_TERMINATE) == DE_TERMINATE) { - DeleteCallbackList(&vndInitCallbackListPtr); + while (vndInitCallbackList.list != NULL) { + CallbackPtr next = vndInitCallbackList.list->next; + free(vndInitCallbackList.list); + vndInitCallbackList.list = next; + } } }