mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
perf sched: Free thread->priv using priv_destructor
[ Upstream commitaa9fdd106b
] In many perf sched subcommand saves priv data structure in the thread but it forgot to free them. As it's an opaque type with 'void *', it needs to register that knows how to free the data. In this case, just regular 'free()' is fine. Fixes:04cb4fc4d4
("perf thread: Allow tools to register a thread->priv destructor") Reviewed-by: Ian Rogers <irogers@google.com> Tested-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250703014942.1369397-3-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5c42686e56
commit
4b3ab5f363
|
@ -3887,6 +3887,8 @@ int cmd_sched(int argc, const char **argv)
|
|||
if (!argc)
|
||||
usage_with_options(sched_usage, sched_options);
|
||||
|
||||
thread__set_priv_destructor(free);
|
||||
|
||||
/*
|
||||
* Aliased to 'perf script' for now:
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user