chore: add TODO about potential use-after-free in get_capturer_for_display()

Signed-off-by: Steve3184 <77789906+Steve3184@users.noreply.github.com>
This commit is contained in:
Steve3184 2026-02-27 20:49:56 +08:00
parent 230cc3d00b
commit 6796c5d023

View file

@ -369,6 +369,9 @@ pub(super) fn get_capturer_for_display(
"get_capturer_for_display: no active capturers, reinitializing PipeWire session for display {}.",
display_idx
);
// to-do: Potential use-after-free: clone() aliases raw pointer and clear() frees it.
// Requires ownership refactor to make lifetime sound.
clear();
ensure_inited()?;