don't crash if -n is given without -c

If -n is given without -c, config_path is still NULL and it would
crash due to a NULL deference.
This commit is contained in:
Omar Polo 2021-08-23 22:43:56 +00:00
parent 83272dfee9
commit 2e31927606
1 changed files with 2 additions and 0 deletions

2
gmid.c
View File

@ -638,6 +638,8 @@ main(int argc, char **argv)
fatal("can't specify options in config mode.");
if (conftest) {
if (config_path == NULL)
fatal("missing configuration");
parse_conf(config_path);
puts("config OK");
return 0;