diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-24 13:29:46 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-24 14:19:28 +0930 |
commit | aec485f2dcc87b340759d67b60e7dee7931aaec5 (patch) | |
tree | ec10332bb4abe3bdc4293cb3b1d38a15179e677b /dix/main.c | |
parent | 9ab4e2fd8eaa87dbd16835affb1aa54dcb1a619e (diff) |
dix: NULL out WindowTable after freeing all the windows.
CloseDownDevices() tries to send PresenceNotify events. If the windows are
already freed, then we are accessing dangling pointers.
Diffstat (limited to 'dix/main.c')
-rw-r--r-- | dix/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dix/main.c b/dix/main.c index db4347341..6d9dd3332 100644 --- a/dix/main.c +++ b/dix/main.c @@ -458,7 +458,10 @@ main(int argc, char *argv[], char *envp[]) #endif config_fini(); + + memset(WindowTable, 0, MAXSCREENS * sizeof(WindowPtr)); CloseDownDevices(); + for (i = screenInfo.numScreens - 1; i >= 0; i--) { FreeScratchPixmapsForScreen(i); |