Do not allow multiple --config arguments

Otherwise there is a small, unimportant memory leak. More important is the fact
that later such flags overwrite earlier flags.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-08-31 13:31:16 +02:00
parent 4cbf87b441
commit e1d5c0c925
1 changed files with 2 additions and 0 deletions

View File

@ -507,6 +507,8 @@ main(int argc, char **argv)
run_test = true; run_test = true;
break; break;
case 'c': case 'c':
if (confpath != NULL)
fatal("--config may only be specified once");
confpath = a_strdup(optarg); confpath = a_strdup(optarg);
break; break;
case 's': case 's':