perf tools: Consolidate error path in __open_dso()
authorNamhyung Kim <namhyung@kernel.org>
Thu, 8 Jun 2017 07:31:06 +0000 (16:31 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 8 Jun 2017 18:39:13 +0000 (15:39 -0300)
commit8ba29adf9a7cdff3c7283d5fc0dcf5e777d3b40f
tree8dc403b78aff477be820b9222d103ac1f37d0249
parent1d6b3c9ba756a5134fd7ad1959acac776d17404b
perf tools: Consolidate error path in __open_dso()

On failure, it should free the 'name', so clean up the error path using
goto.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170608073109.30699-7-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dso.c