Skip to content

Commit

Permalink
Fix segmentation fault in dropstats , vrmemstats utilities.
Browse files Browse the repository at this point in the history
Add all zeros to define end of long_options array.

Change-Id: I1ba57bc0ed6bb2d3ddce3f72dcbd87e2d4e30b53
Closes-Bug: #1679489
  • Loading branch information
krharsh committed Apr 4, 2017
1 parent bd8e19a commit 11d43bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion utils/dropstats.c
Expand Up @@ -199,7 +199,7 @@ enum opt_index {
static struct option long_options[] = {
[HELP_OPT_INDEX] = {"help", no_argument, &help_set, 1},
[CORE_OPT_INDEX] = {"core", required_argument, &core_set, 1},
[MAX_OPT_INDEX] = {"NULL", 0, 0, 0},
[MAX_OPT_INDEX] = {NULL, 0, 0, 0},
};

static void
Expand Down
2 changes: 1 addition & 1 deletion utils/vrmemstats.c
Expand Up @@ -179,7 +179,7 @@ enum opt_index {

static struct option long_options[] = {
[HELP_OPT_INDEX] = {"help", no_argument, &help_set, 1},
[MAX_OPT_INDEX] = {"NULL", 0, 0, 0},
[MAX_OPT_INDEX] = {NULL, 0, 0, 0},
};

static void
Expand Down

0 comments on commit 11d43bd

Please sign in to comment.