From: Arnaldo Carvalho de Melo Date: Fri, 25 Jan 2013 01:45:21 +0000 (-0300) Subject: perf ui browser: Free browser->helpline() on ui_browser__hide() X-Git-Tag: MMI-PSA29.97-13-9~15047^2~12^2~14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56ab7140325c835c8bb53cf3bca0cf7b6e967f15;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf ui browser: Free browser->helpline() on ui_browser__hide() It is allocated at ui_browser__show(), so free it in its counterpart, ui_browser__hide(). Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-g449kvnbcpli4ceyxbe2jp1e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index 588bcb2d008b..809ea4632a34 100644 --- a/tools/perf/ui/browser.c +++ b/tools/perf/ui/browser.c @@ -273,6 +273,8 @@ void ui_browser__hide(struct ui_browser *browser __maybe_unused) { pthread_mutex_lock(&ui__lock); ui_helpline__pop(); + free(browser->helpline); + browser->helpline = NULL; pthread_mutex_unlock(&ui__lock); }