perf hists browser: Fix possible memory leak
authorNamhyung Kim <namhyung@kernel.org>
Wed, 22 Apr 2015 07:18:14 +0000 (16:18 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 May 2015 21:13:13 +0000 (18:13 -0300)
commitf2b487db45f2aa203892384f6a08f0a761edad5d
tree64b69ff4b238f0eaea84d4a95a15040376c3c6da
parentd8a0f80042efc4ba08977f3d66fc4678037fe456
perf hists browser: Fix possible memory leak

The options array saves strings for each popup menu item.  The number of
items can be vary according to the currently selected item.  So it can
leak some memory if it's exited from a small item.  Fix it by freeing
all items when loop terminates.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429687101-4360-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c