https://gitlab.synchro.net/main/sbbs/-/commit/7ad244479109ee15f456a253
Modified Files:
src/sbbs3/useredit.cpp
Log Message:
uedit: free search expressions on early loop exit (CID 651709)
Coverity CID 651709 (RESOURCE_LEAK): "Variable find_expr going out of
scope leaks the storage it points to", at useredit.cpp:108.
sbbs_t::useredit() releases both of its heap allocations -- 'ar' (the
'/' ARS search) and 'find_expr' (the 'T' boolean text search) -- in the
'Q'uit case and again after the display/command loop. Two returns
inside the loop skip that cleanup: the "no user data" bail-out, and the localtime32() failure Coverity flagged. The loop redraws the record on
every pass, so both are reachable after a search has been entered, and
both leak 'ar' as well as 'find_expr'.
Break out of the loop instead of returning, so the existing cleanup
runs. Behavior is otherwise unchanged.
find_expr, and the free(ar) at the loop exit, are from ef1f8026a4
(2026-07-25); the 'ar' leak on these two paths predates it.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net