Thread (2 messages) 2 messages, 2 authors, 2024-06-26

Re: [PATCH] perf pmus: Fixes always false when compare duplicates aliases

flat view

From: Namhyung Kim <namhyung@kernel.org>
Date: 2024-06-26 04:01:49
Also in: linux-perf-users, lkml

On Fri, 14 Jun 2024 17:43:18 +0800, Junhao He wrote:
In the previous loop, all the members in the aliases[j-1] have been freed
and set to NULL. But in this loop, the function pmu_alias_is_duplicate()
compares the aliases[j] with the aliases[j-1] that has already been
disposed, so the function will always return false and duplicate aliases
will never be discarded.

If we find duplicate aliases, it skips the zfree aliases[j], which is
accompanied by a memory leak.

[...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help