]> Git Repo - linux.git/commitdiff
perf tools: Fix double free in perf test 21 (code-reading.c)
authorAdrian Hunter <[email protected]>
Thu, 10 Apr 2014 09:02:54 +0000 (12:02 +0300)
committerJiri Olsa <[email protected]>
Tue, 15 Apr 2014 11:57:14 +0000 (13:57 +0200)
perf_evlist__delete() deletes attached cpu and thread maps
but the test is still using them, so remove them from the
evlist before deleting it.

Signed-off-by: Adrian Hunter <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
tools/perf/tests/code-reading.c

index 653a8fe2db951d0509d41c26aa11e82550207231..bfb186900ac0427ea5feff590f8055514c6652fa 100644 (file)
@@ -504,6 +504,7 @@ static int do_test_code_reading(bool try_kcore)
                if (ret < 0) {
                        if (!excl_kernel) {
                                excl_kernel = true;
+                               perf_evlist__set_maps(evlist, NULL, NULL);
                                perf_evlist__delete(evlist);
                                evlist = NULL;
                                continue;
This page took 0.059106 seconds and 4 git commands to generate.