From a510ddb3e15b1a7805b8d67fb5a41c6d4a20f39c Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Sat, 16 Jan 2010 18:19:43 +0000 Subject: [PATCH] 2010-01-16 [colin] 3.7.4cvs4 * src/plugins/pgpcore/sgpgme.c Probably fix bug 2098, 'claws-mails crashes frequently with pgpcore'. Fix double-free. --- ChangeLog | 6 ++++++ PATCHSETS | 1 + configure.ac | 2 +- src/plugins/pgpcore/sgpgme.c | 6 ++++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f9eded7c..20176bdd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-16 [colin] 3.7.4cvs4 + + * src/plugins/pgpcore/sgpgme.c + Probably fix bug 2098, 'claws-mails crashes frequently + with pgpcore'. Fix double-free. + 2010-01-16 [holger] 3.7.4cvs3 * src/prefs_toolbar.h diff --git a/PATCHSETS b/PATCHSETS index a6e177283..3153152d0 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3934,3 +3934,4 @@ ( cvs diff -u -r 1.1.2.22 -r 1.1.2.23 tools/claws.i18n.status.pl; ) > 3.7.4cvs1.patchset ( cvs diff -u -r 1.10.2.22 -r 1.10.2.23 src/privacy.c; ) > 3.7.4cvs2.patchset ( cvs diff -u -r 1.5.2.10 -r 1.5.2.11 src/prefs_toolbar.h; ) > 3.7.4cvs3.patchset +( cvs diff -u -r 1.1.2.65 -r 1.1.2.66 src/plugins/pgpcore/sgpgme.c; ) > 3.7.4cvs4.patchset diff --git a/configure.ac b/configure.ac index 9956c0bc6..ff20910bc 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=4 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=3 +EXTRA_VERSION=4 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c index eccc3701b..3a3b781b1 100644 --- a/src/plugins/pgpcore/sgpgme.c +++ b/src/plugins/pgpcore/sgpgme.c @@ -860,15 +860,17 @@ check_again: if (!err) err = gpgme_op_keylist_next(ctx, &key); gpgme_op_keylist_end(ctx); - gpgme_release(ctx); if (gpg_err_code(err) == GPG_ERR_EOF) { if (gpgme_get_protocol(ctx) != GPGME_PROTOCOL_CMS) { gpgme_set_protocol(ctx, GPGME_PROTOCOL_CMS); goto check_again; } + gpgme_release(ctx); return FALSE; - } else + } else { + gpgme_release(ctx); return TRUE; + } } void sgpgme_check_create_key(void) -- 2.25.1