perf tools: Fix error handling of lzma decompression
authorShawn Lin <shawn.lin@rock-chips.com>
Sun, 21 Aug 2016 07:57:33 +0000 (15:57 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 24 Aug 2016 14:20:58 +0000 (11:20 -0300)
commitffe67c2fabf128122b30fbf0ac498928e171b0b3
treef0c0aa161d0b99b078817b3750f59df9d081f99c
parent04e11960aa9a5edbe612dd8623190e341aedab35
perf tools: Fix error handling of lzma decompression

lzma_decompress_to_file() never actually closes the file pointer, let's
fix it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1471766253-1964-1-git-send-email-shawn.lin@rock-chips.com
[ Make err = -1, the common case, set it to 0 before the error label ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/lzma.c