summaryrefslogtreecommitdiffstats
path: root/lib/libproc/proc_sym.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libproc/proc_sym.c')
-rw-r--r--lib/libproc/proc_sym.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c
index 766ff73..e52f8ff 100644
--- a/lib/libproc/proc_sym.c
+++ b/lib/libproc/proc_sym.c
@@ -501,13 +501,16 @@ ctf_file_t *
proc_name2ctf(struct proc_handle *p, const char *name)
{
#ifndef NO_CTF
+ ctf_file_t *ctf;
prmap_t *map;
int error;
if ((map = proc_name2map(p, name)) == NULL)
return (NULL);
- return (ctf_open(map->pr_mapname, &error));
+ ctf = ctf_open(map->pr_mapname, &error);
+ free(map);
+ return (ctf);
#else
(void)p;
(void)name;
OpenPOWER on IntegriCloud