From a95b1f2f15d3f8efff74ad7df5085b8f30885dbc Mon Sep 17 00:00:00 2001 From: "Chas Williams (CONTRACTOR)" Date: Wed, 20 Nov 2013 13:57:13 -0500 Subject: [PATCH] cmd: Correctly initialize cmd_OptionAsString arguments These are coming from the stack and as such they might not be NULL. Change-Id: Ia5c6efd08574b4de05a11dceae47021b0160395b Reviewed-on: http://gerrit.openafs.org/10475 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear --- src/volser/volmain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/volser/volmain.c b/src/volser/volmain.c index 6c6ad53594..f8bbd2f73e 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -242,10 +242,10 @@ static int ParseArgs(int argc, char **argv) { int code; int optval; - char *optstring; + char *optstring = NULL; struct cmd_syndesc *opts; - char *sleepSpec; - char *sync_behavior; + char *sleepSpec = NULL; + char *sync_behavior = NULL; opts = cmd_CreateSyntax(NULL, NULL, NULL, NULL); cmd_AddParmAtOffset(opts, OPT_log, "-log", CMD_FLAG, CMD_OPTIONAL,