diff options
author | Taeung Song <treeze.taeung@gmail.com> | 2017-02-01 13:34:07 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-02-08 13:41:12 +0100 |
commit | 360e071b1822d40357e371357f24f6ec43f0a080 (patch) | |
tree | 0e02ef69ade6c9e2ebe082ef05afdf25ea6b5736 /tools/perf/util/map.c | |
parent | perf tools: Use zfree() instead of ad hoc equivalent (diff) | |
download | linux-360e071b1822d40357e371357f24f6ec43f0a080.tar.xz linux-360e071b1822d40357e371357f24f6ec43f0a080.zip |
perf tools: Use zfree() to avoid keeping dangling pointers
The cases changed in this patch are for when we free but keep the
pointer to the freed area, which is not always a good idea.
Be more defensive and zero the pointer to avoid possible use after
free bugs to take more time to be detected.
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1485952447-7013-5-git-send-email-treeze.taeung@gmail.com
[ rewrote commit log ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
0 files changed, 0 insertions, 0 deletions