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 <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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 2caa48a2
...@@ -273,6 +273,8 @@ void ui_browser__hide(struct ui_browser *browser __maybe_unused) ...@@ -273,6 +273,8 @@ void ui_browser__hide(struct ui_browser *browser __maybe_unused)
{ {
pthread_mutex_lock(&ui__lock); pthread_mutex_lock(&ui__lock);
ui_helpline__pop(); ui_helpline__pop();
free(browser->helpline);
browser->helpline = NULL;
pthread_mutex_unlock(&ui__lock); pthread_mutex_unlock(&ui__lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment