mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
glx: use DeleteCallbackList() for callback list destruction
We already have a function for callback list deletion, so use this one instead of doing it manually. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
21fb27735a
commit
cb85ceae2d
@@ -19,6 +19,7 @@ void DeleteCallbackManager(void);
|
|||||||
*
|
*
|
||||||
* @param pcbl pointer to the list head (CallbackListPtr)
|
* @param pcbl pointer to the list head (CallbackListPtr)
|
||||||
*/
|
*/
|
||||||
|
_X_EXPORT /* only for GLX module */
|
||||||
void DeleteCallbackList(CallbackListPtr *pcbl);
|
void DeleteCallbackList(CallbackListPtr *pcbl);
|
||||||
|
|
||||||
#endif /* _XSERVER_CALLBACK_PRIV_H */
|
#endif /* _XSERVER_CALLBACK_PRIV_H */
|
||||||
|
|||||||
10
glx/vndext.c
10
glx/vndext.c
@@ -40,6 +40,7 @@
|
|||||||
#include <GL/glxproto.h>
|
#include <GL/glxproto.h>
|
||||||
#include "vndservervendor.h"
|
#include "vndservervendor.h"
|
||||||
|
|
||||||
|
#include "dix/callback_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "miext/extinit_priv.h"
|
#include "miext/extinit_priv.h"
|
||||||
|
|
||||||
@@ -47,8 +48,7 @@ Bool noGlxExtension = FALSE;
|
|||||||
|
|
||||||
ExtensionEntry *GlxExtensionEntry;
|
ExtensionEntry *GlxExtensionEntry;
|
||||||
int GlxErrorBase = 0;
|
int GlxErrorBase = 0;
|
||||||
static CallbackListRec vndInitCallbackList;
|
static CallbackListPtr vndInitCallbackListPtr = NULL;
|
||||||
static CallbackListPtr vndInitCallbackListPtr = &vndInitCallbackList;
|
|
||||||
static DevPrivateKeyRec glvXGLVScreenPrivKey;
|
static DevPrivateKeyRec glvXGLVScreenPrivKey;
|
||||||
static DevPrivateKeyRec glvXGLVClientPrivKey;
|
static DevPrivateKeyRec glvXGLVClientPrivKey;
|
||||||
|
|
||||||
@@ -209,11 +209,7 @@ GLXReset(ExtensionEntry *extEntry)
|
|||||||
GlxMappingReset();
|
GlxMappingReset();
|
||||||
|
|
||||||
if ((dispatchException & DE_TERMINATE) == DE_TERMINATE) {
|
if ((dispatchException & DE_TERMINATE) == DE_TERMINATE) {
|
||||||
while (vndInitCallbackList.list != NULL) {
|
DeleteCallbackList(&vndInitCallbackListPtr);
|
||||||
CallbackPtr next = vndInitCallbackList.list->next;
|
|
||||||
free(vndInitCallbackList.list);
|
|
||||||
vndInitCallbackList.list = next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user