mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
perf tools: Use zfree() where applicable
In places where the equivalent was already being done, i.e.: free(a); a = NULL; And in placs where struct members are being freed so that if we have some erroneous reference to its struct, then accesses to freed members will result in segfaults, which we can detect faster than use after free to areas that may still have something seemingly valid. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-jatyoofo5boc1bsvoig6bb6i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
7f7c536f23
commit
d8f9da2404
33 changed files with 100 additions and 99 deletions
|
@ -1235,8 +1235,7 @@ void disasm_line__free(struct disasm_line *dl)
|
|||
dl->ins.ops->free(&dl->ops);
|
||||
else
|
||||
ins__delete(&dl->ops);
|
||||
free((void *)dl->ins.name);
|
||||
dl->ins.name = NULL;
|
||||
zfree(&dl->ins.name);
|
||||
annotation_line__delete(&dl->al);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue