From 6988b873b041130d88dd0aae70c10f86550ee2b3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 21 Jul 2016 12:34:28 +0100 Subject: 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 --- src/sna/sna_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3