summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZheng Zengkai <zhengzengkai@huawei.com>2020-07-03 17:33:44 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:26:05 +0100
commitb4281b2f75ffc5df34394b9157d9259aea9dcea2 (patch)
treef1b0f3b8a2198b0876932d52e2c3dbb1f74e0609 /scripts
parent5992bce16a64662bb138237889201c30901c2dcf (diff)
perf record: Fix memory leak when using '--user-regs=?' to list registers
[ Upstream commit 2eb5dd418034ecea2f7031e3d33f2991a878b148 ] When using 'perf record's option '-I' or '--user-regs=' along with argument '?' to list available register names, memory of variable 'os' allocated by strdup() needs to be released before __parse_regs() returns, otherwise memory leak will occur. Fixes: bcc84ec65ad1 ("perf record: Add ability to name registers to record") Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Li Bin <huawei.libin@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20200703093344.189450-1-zhengzengkai@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions