aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index bc6e7e8c480d..242d2b216f46 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -224,7 +224,9 @@ void dso__delete(struct dso *self)
224 int i; 224 int i;
225 for (i = 0; i < MAP__NR_TYPES; ++i) 225 for (i = 0; i < MAP__NR_TYPES; ++i)
226 symbols__delete(&self->symbols[i]); 226 symbols__delete(&self->symbols[i]);
227 if (self->long_name != self->name) 227 if (self->sname_alloc)
228 free((char *)self->short_name);
229 if (self->lname_alloc)
228 free(self->long_name); 230 free(self->long_name);
229 free(self); 231 free(self);
230} 232}
@@ -1530,6 +1532,7 @@ static int map_groups__set_modules_path_dir(struct map_groups *self,
1530 if (long_name == NULL) 1532 if (long_name == NULL)
1531 goto failure; 1533 goto failure;
1532 dso__set_long_name(map->dso, long_name); 1534 dso__set_long_name(map->dso, long_name);
1535 map->dso->lname_alloc = 1;
1533 dso__kernel_module_get_build_id(map->dso, ""); 1536 dso__kernel_module_get_build_id(map->dso, "");
1534 } 1537 }
1535 } 1538 }