perf record: Fix segfault with --no-mmap-pages
Adrian reported a segfault when using --no-out-pages: $ tools/perf/perf record -vv --no-out-pages uname Segmentation fault (core dumped) The same occurs with --no-mmap-pages. Fix by checking that str is non-NULL before parsing it. Signed-off-by: NDavid Ahern <dsahern@gmail.com> Reported-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/1384267617-3446-2-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Showing
想要评论请 注册 或 登录