gh-145846: Fix memory leak in _lsprof clearEntries() context chain (#145847)
clearEntries() only freed the top currentProfilerContext but did not walk the previous linked list. When clear() is called during active profiling with nested calls, all contexts except the top one were leaked. Fix by iterating the entire linked list, matching the existing freelistProfilerContext cleanup pattern. Co-authored-by: Victor Stinner <vstinner@python.org>
R
Ramin Farajpour Cami committed
957b2cca8e7dc86db873de6291767c41e57c1504
Parent: 03d712e
Committed by GitHub <noreply@github.com>
on 4/7/2026, 8:56:19 PM