]> git.baikalelectronics.ru Git - kernel.git/commit
perf callchain: Check return value of add_child()
authorNamhyung Kim <namhyung@kernel.org>
Tue, 16 Feb 2016 14:08:20 +0000 (23:08 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 19 Feb 2016 22:12:52 +0000 (19:12 -0300)
commit2d394c7ea3b1195eb16d19b8e43d4770450556c9
tree811af2fdff6b86cb35e95fbaf2e5878c43b26aa3
parentc5ac648fefd405eb18dfe538066d2490b77bd5f8
perf callchain: Check return value of add_child()

The create_child() in add_child() can return NULL in case of memory
allocation failure.  So check the return value and bail out.  The proper
error handling will be added later.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1455631723-17345-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/callchain.c