1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-26 01:52:45 +02:00

scd: Fix checking memory allocation.

* scd/app-openpgp.c (read_public_key): Fix the memory.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-03-08 11:33:18 +09:00 committed by Werner Koch
parent 37d7ee8b98
commit abcf0116ee
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1766,7 +1766,7 @@ read_public_key (app_t app, ctrl_t ctrl, u32 created_at, int keyno,
len = gcry_sexp_sprint (s_pkey, GCRYSEXP_FMT_CANON, NULL, 0);
keybuf = xtrymalloc (len);
if (!data)
if (!keybuf)
{
err = gpg_error_from_syserror ();
gcry_sexp_release (s_pkey);