perf script: Fix error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 16 Sep 2017 06:25:37 +0000 (08:25 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 23 Oct 2017 19:30:53 +0000 (16:30 -0300)
commitdb49bc155ad9f04ea3c4e1c9ae87850610feb1ce
treead3a1e1020613fb3f34111a696b5e506a715a2a5
parenta1a587073ccdc6ffae414259f65d0a94cadd0a72
perf script: Fix error handling path

If the string passed in '--time' is invalid, or if failed to set
libtraceevent function resolver, we must do some cleanup before leaving.
As in the other error handling paths of this function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: kernel-janitors@vger.kernel.org
Link: http://lkml.kernel.org/r/20170916062537.28921-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c