[PATCH 6/9] dix: delete all callbacks before reset
Peter Hutterer
peter.hutterer at who-t.net
Mon Feb 27 16:41:03 PST 2012
DeleteCallbackManager() introduced for better symmetry in the caller, they
do the same thing.
==20085== 24 bytes in 1 blocks are still reachable in loss record 11 of 103
==20085== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236)
==20085== by 0x43A097: CreateCallbackList (dixutils.c:837)
==20085== by 0x43A1D3: AddCallback (dixutils.c:869)
==20085== by 0x4B1736: GEExtensionInit (geext.c:209)
==20085== by 0x41C8A8: InitExtensions (miinitext.c:389)
==20085== by 0x5AC918: main (main.c:208)
==2042== 8 bytes in 1 blocks are still reachable in loss record 2 of 97
==2042== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236)
==2042== by 0x4C2A657: realloc (vg_replace_malloc.c:525)
==2042== by 0x4802F5: XNFrealloc (utils.c:1095)
==2042== by 0x43A17A: CreateCallbackList (dixutils.c:855)
==2042== by 0x43A1EF: AddCallback (dixutils.c:870)
==2042== by 0x4B1752: GEExtensionInit (geext.c:209)
==2042== by 0x41C8A8: InitExtensions (miinitext.c:389)
==2042== by 0x5AC9E4: main (main.c:208)
==2042==
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/dixutils.c | 8 +++++++-
dix/main.c | 2 ++
include/callback.h | 1 +
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dix/dixutils.c b/dix/dixutils.c
index da26dc1..7d9d3e3 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -887,7 +887,7 @@ DeleteCallbackList(CallbackListPtr *pcbl)
}
void
-InitCallbackManager(void)
+DeleteCallbackManager(void)
{
int i;
@@ -900,3 +900,9 @@ InitCallbackManager(void)
numCallbackListsToCleanup = 0;
listsToCleanup = NULL;
}
+
+void
+InitCallbackManager(void)
+{
+ DeleteCallbackManager();
+}
diff --git a/dix/main.c b/dix/main.c
index bc75c0b..8e6df46 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -340,6 +340,8 @@ int main(int argc, char *argv[], char *envp[])
FreeAuditTimer();
+ DeleteCallbackManager();
+
if (dispatchException & DE_TERMINATE)
{
CloseWellKnownConnections();
diff --git a/include/callback.h b/include/callback.h
index 9a1da73..f9711c6 100644
--- a/include/callback.h
+++ b/include/callback.h
@@ -90,5 +90,6 @@ extern _X_EXPORT void DeleteCallbackList(
CallbackListPtr * /*pcbl*/);
extern _X_EXPORT void InitCallbackManager(void);
+extern _X_EXPORT void DeleteCallbackManager(void);
#endif /* CALLBACK_H */
--
1.7.7.6
More information about the xorg-devel
mailing list