summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-07-21 12:34:28 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-07-21 12:53:56 +0100
commit6988b873b041130d88dd0aae70c10f86550ee2b3 (patch)
tree5e9b94a5d13def95484d9e0c05291ce6690599e5
parentd39197bb10b7d88cb4c456e7a5e8d34c1dc6eeaf (diff)
sna: Unregister the BlockHandler on close
Now that we register a callback with an external stack and not the screen, we have to remove it when the screen is destroyed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_driver.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 60a5a970..841ccd11 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -949,6 +949,12 @@ static Bool sna_early_close_screen(CLOSE_SCREEN_ARGS_DECL)
/* XXX Note that we will leak kernel resources if !vtSema */
+#if HAVE_NOTIFY_FD
+ RemoveBlockAndWakeupHandlers(sna_block_handler,
+ (ServerWakeupHandlerProcPtr)NoopDDA,
+ sna);
+#endif
+
sna_uevent_fini(sna);
sna_mode_close(sna);