diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2010-07-22 18:36:48 +0200 |
---|---|---|
committer | Christophe Varoqui <christophe.varoqui@opensvc.com> | 2010-07-26 10:29:20 +0200 |
commit | 3eacec6d7be728605f92d748451494b048b49bb2 (patch) | |
tree | 8d486adc12d72a268174a9170e036952c1229e07 | |
parent | 828d2fbaab304d1ec7db2f563a59eaf2c7a516ea (diff) | |
download | multipath-tools-3eacec6d7be728605f92d748451494b048b49bb2.tar.gz |
multipath-tools: Intialize pointer passed to get_cmdvec
get_cmdvec can return before the vector argument has been initialized. Fix this
by initializing the pointer before passing it to get_cmdvec. This fixes a
segfault in the interactive mode when hitting the tab key directly on the
command prompt.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
-rw-r--r-- | multipathd/cli.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/multipathd/cli.c b/multipathd/cli.c index 208a0ad..b39a47f 100644 --- a/multipathd/cli.c +++ b/multipathd/cli.c @@ -363,7 +363,7 @@ parse_cmd (char * cmd, char ** reply, int * len, void * data) { int r; struct handler * h; - vector cmdvec; + vector cmdvec = NULL; r = get_cmdvec(cmd, &cmdvec); @@ -467,7 +467,7 @@ key_generator (const char * str, int state) struct key * kw; int i; struct handler *h; - vector v; + vector v = NULL; if (!state) { index = 0; |