diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2026-07-01 12:41:50 -0700 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-07-03 13:40:24 -0700 |
| commit | cd589eba99f4578a6cf495fa23d02c28fc129ec1 (patch) | |
| tree | b91d2d1a1bf12668574ac19e3bd7ecb67e277fe6 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 95e63238386524e231fcd100b9e6db22053fd4ff (diff) | |
perf kvm: Kill STRDUP_FAIL_EXIT()
It's used to pass command line options to a copied argv. But there's no
reason to make the copies as it's all used in the same function. It can
simply use stack variables.
In fact, it fixes a subtle double free issue. As parse_options() can
move contents in argv[], some entries may point to the same item. So
freeing all items in the argv could trigger a double free. With stack
variables, we don't need to allocate and free them.
Tested-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
