Skip to content
Commit 360e071b authored by Taeung Song's avatar Taeung Song Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarTaeung 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 506fde11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment