summaryrefslogtreecommitdiff
path: root/tools/perf/tests/symbols.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/symbols.c')
-rw-r--r--tools/perf/tests/symbols.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/tests/symbols.c b/tools/perf/tests/symbols.c
index 057b16df6416..2d1aa42d36a9 100644
--- a/tools/perf/tests/symbols.c
+++ b/tools/perf/tests/symbols.c
@@ -38,6 +38,7 @@ static int init_test_info(struct test_info *ti)
static void exit_test_info(struct test_info *ti)
{
thread__put(ti->thread);
+ machine__delete_threads(ti->machine);
machine__delete(ti->machine);
}
@@ -101,6 +102,7 @@ static int test_file(struct test_info *ti, char *filename)
{
struct map *map = NULL;
int ret, nr;
+ struct dso *dso;
pr_debug("Testing %s\n", filename);
@@ -108,7 +110,8 @@ static int test_file(struct test_info *ti, char *filename)
if (ret != TEST_OK)
return ret;
- nr = dso__load(map->dso, map);
+ dso = map__dso(map);
+ nr = dso__load(dso, map);
if (nr < 0) {
pr_debug("dso__load() failed!\n");
ret = TEST_FAIL;
@@ -121,7 +124,7 @@ static int test_file(struct test_info *ti, char *filename)
goto out_put;
}
- ret = test_dso(map->dso);
+ ret = test_dso(dso);
out_put:
map__put(map);