diff --git a/scd/command.c b/scd/command.c index fc1f5a20e..b26bd6862 100644 --- a/scd/command.c +++ b/scd/command.c @@ -777,10 +777,8 @@ cmd_readkey (assuan_context_t ctx, char *line) rc = ksba_cert_new (&kc); if (rc) - { - xfree (cert); - goto leave; - } + goto leave; + rc = ksba_cert_init_from_mem (kc, cert, ncert); if (rc) {