fix(x11): free the correct XQueryTree child list in anythingFullscreen (per-frame leak) (#643)
X11FullScreenDetector::anythingFullscreen() runs every frame. It calls
XQueryTree a second time on our own window solely to learn its parent,
which allocates a `schildren` list that must be XFree'd. The cleanup
freed the wrong pointer:
if (schildren) {
XFree (children); // frees the OUTER list, not schildren
}
Consequences:
- `schildren` is never freed -> one window-list leaks every frame. On a
multi-window X11 desktop this grows RSS without bound (observed ~8 GB
per instance after ~40h).
- `children` is freed early while the loop below still reads children[i]
(use-after-free), then freed again at the end (double-free) whenever
our window has children.
- The early `return false` on inner-XQueryTree failure also leaked
`children`.
Fix: XFree(schildren) in the guard, and XFree(children) before the early
return. `children` is still freed once at the end as before.
Verified with heaptrack: the per-frame `render() -> anythingFullscreen()
-> XQueryTree` leak stack disappears; total leaked over a 90s run drops
from 55.2M to 9.5M (remainder is one-time setup allocations).
Co-authored-by: Starkka15 <starkka15@users.noreply.github.com>