Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: fix rare double-free when xinerama update fails
Explicitly set `xinerama_scr_regs` to `NULL` after calling free() to avoid freeing them again. Under normal operation we free the old xinerama screen region list on root screen changes and allocate a new one with the updated regions. On rare occasions — mainly reproducable by changing monitors while DPMS is in standby — updating the region list might fail as for whatever reason the xinerama extension is marked as inactive. This would leave us with an invalid pointer to the already freed region list we would then attempt to free again on the next root screen change.
- Loading branch information