viced: clear optstring before parsing
authorDerrick Brashear <shadow@dementix.org>
Fri, 8 Jun 2012 23:52:33 +0000 (19:52 -0400)
committerDerrick Brashear <shadow@dementix.org>
Fri, 8 Jun 2012 23:56:16 +0000 (16:56 -0700)
we try to free the string if there was a value, so
if there's none we should probably ensure we know it

Change-Id: I20fc535e56d65c82f26852ba59528d5660c98e20
Reviewed-on: http://gerrit.openafs.org/7546
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

src/viced/viced.c

index f03ac08..fcafe3e 100644 (file)
@@ -984,7 +984,7 @@ ParseArgs(int argc, char *argv[])
 {
     int code;
     int optval;
-    char *optstring;
+    char *optstring = NULL;
     struct cmd_item *optlist;
     struct cmd_syndesc *opts;