aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/gpg.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 225ca9af0..34d436ff3 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -2155,7 +2155,14 @@ check_user_ids (strlist_t *sp,
t->d, option);
if (! hd)
- hd = keydb_new ();
+ {
+ hd = keydb_new ();
+ if (!hd)
+ {
+ rc = gpg_error_from_syserror ();
+ break;
+ }
+ }
else
keydb_search_reset (hd);
@@ -2295,8 +2302,7 @@ check_user_ids (strlist_t *sp,
strlist_rev (&s2);
- if (hd)
- keydb_release (hd);
+ keydb_release (hd);
free_strlist (s);
*sp = s2;
@@ -4728,10 +4734,7 @@ main (int argc, char **argv)
hd = keydb_new ();
if (! hd)
- {
- log_error (_("Failed to open the keyring DB.\n"));
- g10_exit (1);
- }
+ g10_exit (1);
for (i = 1; i < argc; i ++)
{