Skip to content
Snippets Groups Projects
Commit bf6667d6 authored by Stefan Hajnoczi's avatar Stefan Hajnoczi Committed by Aneesh Kumar K.V
Browse files

virtfs-proxy-helper: add missing long option terminator


The getopt_long(3) long options array must have a zeroed terminator.

This patch solves a segmentation fault when an unknown command-line
option is encountered:

  $ fsdev/virtfs-proxy-helper --help
  Segmentation fault (core dumped)

Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
parent 93f6d1c1
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@ static struct option helper_opts[] = {
{"socket", required_argument, NULL, 's'},
{"uid", required_argument, NULL, 'u'},
{"gid", required_argument, NULL, 'g'},
{},
};
static bool is_daemon;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment