perf machine: Destructors should accept NULL
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Jun 2016 13:19:11 +0000 (10:19 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Jun 2016 13:19:11 +0000 (10:19 -0300)
commit32ca678dcd250f05183cf0c8a9e516545c6068bc
tree25604da734a20e54457e79e8bc02ec09b631feb0
parent61b3f66a3f99bb8a6a5145b1c2bd7eb98bf64748
perf machine: Destructors should accept NULL

And do nothing, just like free(), to avoid having to test it in callers,
usually in error paths.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-q42gj3b3znhho9z1mrbo4jce@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c
tools/perf/util/probe-event.c