perf probe: Check for dup and fdopen failures
authorColin Ian King <colin.king@canonical.com>
Fri, 12 Aug 2016 21:44:56 +0000 (22:44 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 15 Aug 2016 20:06:19 +0000 (17:06 -0300)
commit0325862dc364d8af524bf2db53ef4360ed55b989
tree4c307fc74ea114e1a97b78bb6365a6f61ca51e2f
parent50de1a0c54cdbc69a6dbcbc323f53daf95a4050e
perf probe: Check for dup and fdopen failures

dup and fdopen can potentially fail, so add some extra
error handling checks rather than assuming they always work.

Signed-off-by: Colin King <colin.king@canonical.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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/1471038296-12956-1-git-send-email-colin.king@canonical.com
[ Free resources when those functions (now being verified) fail ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-file.c