Skip to contentSkip to conversation

perf test: free cpus at the end of test__open_syscall_event_on_all_cpus()

PATCH New Han Pingtian 1 participant 1 message Jan 16, 2011 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf test: free cpus at the end of test__open_syscall_event_on_all_cpus()

Call free() on cpu_map pointer cpus to clean up malloced memories at the end of test__open_syscall_event_on_all_cpus().

---
 tools/perf/builtin-test.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tools/perf/builtin-test.c +1 -0
index e7f098b..ae1e9a4 100644
@@ -422,6 +422,7 @@ out_evsel_delete:
 	perf_evsel__delete(evsel);
 out_cpu_free:
 	CPU_FREE(cpu_set);
+	free(cpus);
 out_thread_map_delete:
 	thread_map__delete(threads);
 	return err;
Signature · 1 line
1.7.3.4