]> git.baikalelectronics.ru Git - kernel.git/commit
perf script: Fix mem leaks and NULL pointer checks around strdup()s
authorRobert Richter <robert.richter@amd.com>
Fri, 25 Nov 2011 10:38:40 +0000 (11:38 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 12 Dec 2011 10:44:00 +0000 (08:44 -0200)
commit0fbb5c26a9b834fb8f580781ebc801b5b10cbe66
treebbb838b6a52b20965b197a01807392e50193f321
parentc7797602af81c42823aad0172bd31626418daa9c
perf script: Fix mem leaks and NULL pointer checks around strdup()s

Fix mem leaks and missing NULL pointer checks after strdup().

And get_script_path() did not free __script_root in case of continue.

Introduce a helper function get_script_root().

Cc: Ingo Molnar <mingo@elte.hu>
Link: http://lkml.kernel.org/r/1322217520-3287-1-git-send-email-robert.richter@amd.com
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c