- case 'R': /* chroot to NETNAME dir */
- do_chroot = true;
- break;
-
- case 'U': /* setuid to USER */
- switchuser = optarg;
- break;
-#endif
-
- case 1: /* show help */
- show_help = true;
- break;
-
- case 2: /* show version */
- show_version = true;
- break;
-
- case 3: /* bypass security */
- bypass_security = true;
- break;
-
- case 4: /* write log entries to a file */
- use_syslog = false;
- use_logfile = true;
- if(!optarg && optind < argc && *argv[optind] != '-')
- optarg = argv[optind++];
- if(optarg)
- logfilename = xstrdup(optarg);
- break;
-
- case 5: /* open control socket here */
- pidfilename = xstrdup(optarg);
- break;
-
- case '?': /* wrong options */
- usage(true);
- return false;
-
- default:
- break;
+
+ case 'R': /* chroot to NETNAME dir */
+ do_chroot = true;
+ break;
+
+ case 'U': /* setuid to USER */
+ switchuser = optarg;
+ break;
+#endif
+
+ case 1: /* show help */
+ show_help = true;
+ break;
+
+ case 2: /* show version */
+ show_version = true;
+ break;
+
+ case 3: /* bypass security */
+ bypass_security = true;
+ break;
+
+ case 4: /* write log entries to a file */
+ use_syslog = false;
+ use_logfile = true;
+
+ if(!optarg && optind < argc && *argv[optind] != '-') {
+ optarg = argv[optind++];
+ }
+
+ if(optarg) {
+ free(logfilename);
+ logfilename = xstrdup(optarg);
+ }
+
+ break;
+
+ case 5: /* open control socket here */
+ free(pidfilename);
+ pidfilename = xstrdup(optarg);
+ break;
+
+ case '?': /* wrong options */
+ usage(true);
+ goto exit_fail;
+
+ default:
+ break;