diff options
author | David Ahern <dsahern@gmail.com> | 2013-01-14 10:47:30 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-24 16:40:32 -0300 |
commit | b7c14a0b6a4e3add92e1527a31cb1826f4799248 (patch) | |
tree | 8f0c74f0e2250ffb833178fd1c3baf3e0dec7918 /tools/perf/util/symbol.c | |
parent | 164c800e42657e586f6fd446b3d8d41cf1f815f1 (diff) | |
download | talos-obmc-linux-b7c14a0b6a4e3add92e1527a31cb1826f4799248.tar.gz talos-obmc-linux-b7c14a0b6a4e3add92e1527a31cb1826f4799248.zip |
perf symbols: Mark vmlinux filename as allocated
Needs to be marked allocated so memory can be freed when dso is deleted.
Signed-off-by: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1358185650-90848-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index daf95549e7b9..e6432d85b43d 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -923,8 +923,10 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map, filename = dso__build_id_filename(dso, NULL, 0); if (filename != NULL) { err = dso__load_vmlinux(dso, map, filename, filter); - if (err > 0) + if (err > 0) { + dso->lname_alloc = 1; goto out; + } free(filename); } @@ -932,6 +934,7 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map, err = dso__load_vmlinux(dso, map, vmlinux_path[i], filter); if (err > 0) { dso__set_long_name(dso, strdup(vmlinux_path[i])); + dso->lname_alloc = 1; break; } } @@ -971,6 +974,7 @@ static int dso__load_kernel_sym(struct dso *dso, struct map *map, if (err > 0) { dso__set_long_name(dso, strdup(symbol_conf.vmlinux_name)); + dso->lname_alloc = 1; goto out_fixup; } return err; |