talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 5fb879d20a048217c578c981233a7cbb702cf60a
parent 11980bc7a384136cc2d9aada20988bcd462b1ffc
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed, 12 Jul 2017 09:47:45 +0200

Fix use of uninitialized value in sgpgme_has_secret_key().

Fixes commit 11980bc7a.

Diffstat:
Msrc/plugins/pgpcore/sgpgme.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c @@ -1098,9 +1098,10 @@ gboolean sgpgme_has_secret_key(void) } check_again: err = gpgme_op_keylist_start(ctx, NULL, TRUE); - if (!err) + if (!err) { err = gpgme_op_keylist_next(ctx, &key); - gpgme_key_unref(key); /* We're not interested in the key itself. */ + gpgme_key_unref(key); /* We're not interested in the key itself. */ + } gpgme_op_keylist_end(ctx); if (gpg_err_code(err) == GPG_ERR_EOF) { if (gpgme_get_protocol(ctx) != GPGME_PROTOCOL_CMS) {