perf ui browser: Free browser->helpline() on ui_browser__hide()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 25 Jan 2013 01:45:21 +0000 (22:45 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 25 Jan 2013 15:49:29 +0000 (12:49 -0300)
It is allocated at ui_browser__show(), so free it in its counterpart,
ui_browser__hide().

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-g449kvnbcpli4ceyxbe2jp1e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browser.c

index 588bcb2d008b499bac13dc07f0f88422a6806974..809ea4632a34fc0f90e766eb3cf16175904cbefa 100644 (file)
@@ -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);
 }