summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2026-07-10 17:32:35 -0700
committerNamhyung Kim <namhyung@kernel.org>2026-07-16 09:56:47 -0700
commiteadce0f46a1d066b812c7e5aa46a33711c78a755 (patch)
treee882005748ece9a43c5582ef1611646f81ce1364 /tools/perf/scripts/python/flamegraph.py
parent557f8b3ca8c8e58d5bc3084734bc7a470b043922 (diff)
tools/lib/api: Fix potential double-free from fdarray__grow()
If the realloc for fda->entries succeeds but the realloc for fda->priv fails, the error path frees the newly allocated entries. However, fda->entries is neither updated to point to the new entries block nor cleared to NULL. If realloc moved the allocation to a new block, the old fda->entries pointer is now freed memory. When fdarray__exit() is later called to clean up, it executes free(fda->entries), which would trigger a double-free on that old pointer. Reported-by: Sashiko Review <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/linux-perf-users/20260710200150.11FE71F00A3A@smtp.kernel.org Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions