Author: markj Date: Tue Dec 23 15:40:57 2014 New Revision: 276143 URL: https://svnweb.freebsd.org/changeset/base/276143
Log: Fix a memory leak that occured when looking up CTF info for a symbol. Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Tue Dec 23 15:38:19 2014 (r276142) +++ head/lib/libproc/proc_sym.c Tue Dec 23 15:40:57 2014 (r276143) @@ -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; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"