scd: Avoid memory leak.

* scd/command.c (cmd_readkey): Free allocated memory on failure path.

--

GnuPG-bug-id: 5393
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Jakub Jelen 2021-09-13 14:24:30 +02:00 committed by NIIBE Yutaka
parent 50e6d63f12
commit c0b1bcc5c6
1 changed files with 1 additions and 0 deletions

View File

@ -806,6 +806,7 @@ cmd_readkey (assuan_context_t ctx, char *line)
if (!pkadv)
{
rc = gpg_error_from_syserror ();
gcry_sexp_release (s_key);
goto leave;
}
log_assert (pkadvlen);