summaryrefslogtreecommitdiffstats
path: root/dirmngr/ocsp.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2022-08-03 10:49:58 +0200
committerWerner Koch <wk@gnupg.org>2022-08-03 10:49:58 +0200
commitb067285d595a084adaf514a214954a92ee87329d (patch)
treeab5b38b6b4ac75920f69dc757d76cfdc1f9acc9d /dirmngr/ocsp.c
parentgpgconf: Add config file for Windows Registry dumps. (diff)
downloadgnupg2-b067285d595a084adaf514a214954a92ee87329d.tar.xz
gnupg2-b067285d595a084adaf514a214954a92ee87329d.zip
dirmngr: Fix failed malloc error message.
* dirmngr/ocsp.c (check_signature): Fix error printing of xtrymalloc.
Diffstat (limited to 'dirmngr/ocsp.c')
-rw-r--r--dirmngr/ocsp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dirmngr/ocsp.c b/dirmngr/ocsp.c
index f8b3e8c79..0da96ba15 100644
--- a/dirmngr/ocsp.c
+++ b/dirmngr/ocsp.c
@@ -577,8 +577,11 @@ check_signature (ctrl_t ctrl,
/* dump_cert ("from ocsp response", cert); */
cref = xtrymalloc (sizeof *cref);
if (!cref)
- log_error (_("allocating list item failed: %s\n"),
- gcry_strerror (err));
+ {
+ err = gpg_error_from_syserror ();
+ log_error (_("allocating list item failed: %s\n"),
+ gpg_strerror (err));
+ }
else if (!cache_cert_silent (cert, &cref->fpr))
{
cref->next = ctrl->ocsp_certs;