mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
We want drivers' close screen hooks to be called before glamor's close screen hook, because they may have gbm bo's created with glamor's gbm device. If we free the gbm device before the driver frees all gbm bo's, then the drivers could have an use-after-free when freeing the bo's. This fixes a memory leak, since before this change, we were just leaking everything glamor mapped to a screen, not freeing EGLImages, gbm devices, etc. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>