aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-03-08 02:33:18 +0000
committerNIIBE Yutaka <[email protected]>2023-03-08 02:33:18 +0000
commit4e391d95e0711646af649167c7de018cb6367097 (patch)
tree2435915878c811382bfc821b30a0e99984d1ead1 /scd/app-openpgp.c
parentdoc: Typo fixes and new notes in DETAILS (diff)
downloadgnupg-4e391d95e0711646af649167c7de018cb6367097.tar.gz
gnupg-4e391d95e0711646af649167c7de018cb6367097.zip
scd: Fix checking memory allocation.
* scd/app-openpgp.c (read_public_key): Fix the memory. -- Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index e445b2409..f5d0b5111 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -1863,7 +1863,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);