1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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

View File

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