Commit d763f3e0 authored by Antonin Décimo's avatar Antonin Décimo Committed by Juliusz Chroboczek

Error if configured key can't be found.

parent 3cb0ab7a
...@@ -690,11 +690,14 @@ parse_anonymous_ifconf(int c, gnc_t gnc, void *closure, ...@@ -690,11 +690,14 @@ parse_anonymous_ifconf(int c, gnc_t gnc, void *closure,
char *key_id; char *key_id;
struct key *key; struct key *key;
c = getword(c, &key_id, gnc, closure); c = getword(c, &key_id, gnc, closure);
if(c < -1) { if(c < -1)
goto error;
key = find_key(key_id);
if(key == NULL) {
fprintf(stderr, "Couldn't find key %s.\n", key_id);
free(key_id); free(key_id);
goto error; goto error;
} }
key = find_key(key_id);
if_conf->key = key; if_conf->key = key;
free(key_id); free(key_id);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment