Skip to content

Commit 916c31f

Browse files
Ravi Bangoriaacmel
authored andcommitted
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 <[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]>
1 parent 6e67d77 commit 916c31f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/builtin-version.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ static struct version version;
1919
static struct option version_options[] = {
2020
OPT_BOOLEAN(0, "build-options", &version.build_options,
2121
"display the build options"),
22+
OPT_END(),
2223
};
2324

2425
static const char * const version_usage[] = {

0 commit comments

Comments
 (0)