diff --git a/agent/command.c b/agent/command.c index 575456cc5..40322f385 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1418,7 +1418,9 @@ cmd_readkey (assuan_context_t ctx, char *line) goto leave; rc = agent_public_key_from_file (ctrl, grip, &s_pkey); - if (!rc) + if (rc) + goto leave; + else { if (opt_format_ssh) {