mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
perf tools: Use zfree to help detect use after free bugs
Several areas already used this technique, so do some audit to consistently use it elsewhere. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-9sbere0kkplwe45ak6rk4a1f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
046625231a
commit
74cf249d5c
29 changed files with 83 additions and 80 deletions
|
@ -372,7 +372,7 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
|
|||
* This mem info was allocated from machine__resolve_mem
|
||||
* and will not be used anymore.
|
||||
*/
|
||||
free(entry->mem_info);
|
||||
zfree(&entry->mem_info);
|
||||
|
||||
/* If the map of an existing hist_entry has
|
||||
* become out-of-date due to an exec() or
|
||||
|
@ -475,8 +475,8 @@ hist_entry__collapse(struct hist_entry *left, struct hist_entry *right)
|
|||
|
||||
void hist_entry__free(struct hist_entry *he)
|
||||
{
|
||||
free(he->branch_info);
|
||||
free(he->mem_info);
|
||||
zfree(&he->branch_info);
|
||||
zfree(&he->mem_info);
|
||||
free_srcline(he->srcline);
|
||||
free(he);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue