]> Git Repo - J-linux.git/commitdiff
perf version: Fix segfault due to missing OPT_END()
authorRavi Bangoria <[email protected]>
Tue, 11 Jun 2019 03:01:09 +0000 (08:31 +0530)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 15 Jul 2019 10:59:05 +0000 (07:59 -0300)
'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 <[email protected]>
Reviewed-by: Kamalesh Babulal <[email protected]>
Tested-by: Mamatha Inamdar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kamalesh Babulal <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-version.c

index f470144d1a7043ecf9fbcc3467d15c6df148b3d1..bf114ca9ca870ba27bdc8a29d88faecf42895015 100644 (file)
@@ -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[] = {
This page took 0.052993 seconds and 4 git commands to generate.