Fix a memory leak that occured when looking up CTF info for a symbol.
This commit is contained in:
parent
cafe874475
commit
3f1cbdbeb1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276143
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user