Re: [PATCH] perf ftrace: Fix leak in parse_filter_event

From: Namhyung Kim

Date: Tue Aug 04 2026 - 14:00:21 EST


On Mon, 03 Aug 2026 10:50:04 +0300, Michail Tatas wrote:
> strsep() advances the pointer given to it. After the loop s is
> either NULL (on success) or points mid buffer (early exit if malloc
> fails) so the original buffer is never freed properly.
> Fix by adding a tmp pointer for use by strsep and free the original
> pointer
>
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung