Skip to contentSkip to conversation

perf tools: Fix missing free of machine->kallsyms_filename

PATCH Applied Adrian Hunter 3 participants 3 messages Aug 9, 2022 – Aug 10, 2022 perf events

lore
Share & tools
lore

Adrian Hunter

author reviewer
#0 lore raw

PATCH 1/1 perf tools: Fix missing free of machine->kallsyms_filename

Add missing free of machine->kallsyms_filename to machine__exit().

Fixes a5367ecb5353 ("perf tools: Automatically use guest kcore_dir if present")
---
 tools/perf/util/machine.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/util/machine.c +1 -0
index facc13fbf16e..2a16cae28407 100644
@@ -236,6 +236,7 @@ void machine__exit(struct machine *machine)
 	zfree(&machine->root_dir);
 	zfree(&machine->mmap_name);
 	zfree(&machine->current_tid);
+	zfree(&machine->kallsyms_filename);
 
 	for (i = 0; i < THREADS__TABLE_SIZE; i++) {
 		struct threads *threads = &machine->threads[i];
Signature · 1 line
2.25.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Adrian Hunter

Add missing free of machine->kallsyms_filename to machine__exit().

Fixes a5367ecb5353 ("perf tools: Automatically use guest kcore_dir if present")

Thanks,
Ian

Quoted 19 lines
---
 tools/perf/util/machine.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/util/machine.c +1 -1
index facc13fbf16e..2a16cae28407 100644
@@ -236,6 +236,7 @@ void machine__exit(struct machine *machine)
        zfree(&machine->root_dir);
        zfree(&machine->mmap_name);
        zfree(&machine->current_tid);
+       zfree(&machine->kallsyms_filename);
 
        for (i = 0; i < THREADS__TABLE_SIZE; i++) {
                struct threads *threads = &machine->threads[i];
--

2.25.1

maintainer Applied
#2 lore raw

Em Tue, Aug 09, 2022 at 09:51:12AM -0700, Ian Rogers escreveu:

Quoted 8 lines · Adrian Hunter
Quoted 5 lines

Add missing free of machine->kallsyms_filename to machine__exit().

Fixes a5367ecb5353 ("perf tools: Automatically use guest kcore_dir if present")

Thanks, applied.

- Arnaldo

Quoted 22 lines

Thanks,
Ian

Quoted 19 lines
---
 tools/perf/util/machine.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/util/machine.c +1 -1
index facc13fbf16e..2a16cae28407 100644
@@ -236,6 +236,7 @@ void machine__exit(struct machine *machine)
        zfree(&machine->root_dir);
        zfree(&machine->mmap_name);
        zfree(&machine->current_tid);
+       zfree(&machine->kallsyms_filename);
 
        for (i = 0; i < THREADS__TABLE_SIZE; i++) {
                struct threads *threads = &machine->threads[i];
--

2.25.1

Signature · 1 line
- Arnaldo