diff options
author | Ravi Bangoria <ravi.bangoria@linux.ibm.com> | 2019-06-11 08:31:09 +0530 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-15 07:59:05 -0300 |
commit | 916c31fff946fae0e05862f9b2435fdb29fd5090 (patch) | |
tree | 185f09433c2a405357dc8f4b9da7e77c0731e9ef | |
parent | 6e67d77d673d785631b0c52314b60d3c68ebe809 (diff) | |
download | linux-stable-916c31fff946fae0e05862f9b2435fdb29fd5090.tar.gz linux-stable-916c31fff946fae0e05862f9b2435fdb29fd5090.tar.bz2 linux-stable-916c31fff946fae0e05862f9b2435fdb29fd5090.zip |
perf version: Fix segfault due to missing OPT_END()
'perf version' on powerpc segfaults when used with non-supported
option:
# perf version -a
Segmentation fault (core dumped)
Fix this.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Tested-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20190611030109.20228-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-version.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c index f470144d1a70..bf114ca9ca87 100644 --- a/tools/perf/builtin-version.c +++ b/tools/perf/builtin-version.c @@ -19,6 +19,7 @@ static struct version version; static struct option version_options[] = { OPT_BOOLEAN(0, "build-options", &version.build_options, "display the build options"), + OPT_END(), }; static const char * const version_usage[] = { |