szn

Bug 177 — Memory leak on partial allocation failure inside ChooseMode.enter()

177. Memory leak on partial allocation failure inside ChooseMode.enter()

File: src/choose.zig:34–52 Severity: HIGH Status: ✅ FIXED — added errdefer to free already-allocated items and clear the items list on loop failure.

If dupe or append fails mid-loop, any items previously appended in the current call are left stored in self.items.items without being cleaned up, leaking memory if the choose mode fails to initialize fully.


NEW BUGS (2026-06-28 BUGS.tmp audit)