Skip to content

Commit

Permalink
perf version: Fix segfault due to missing OPT_END()
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Ravi Bangoria authored and Arnaldo Carvalho de Melo committed Jul 15, 2019
1 parent 6e67d77 commit 916c31f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/builtin-version.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 916c31f

Please sign in to comment.