diff options
author | Kevin McCarthy <kevin@8t8.us> | 2018-03-22 09:39:49 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2018-03-22 09:39:49 -0700 |
commit | e275bb0622b868de855fcdcbcc78786f31141a08 (patch) | |
tree | 1248ba28526a2f0fc5919b06a97e6bdedd23c1ee /crypt-gpgme.c | |
parent | e250c60203a1430d0e84f61bd67cbe31b4ee1bd0 (diff) | |
parent | eeba9a9ba9262d820b448ce680b1e7c9c5c13ff4 (diff) |
Merge branch 'stable'
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r-- | crypt-gpgme.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c index 36fa1138..700a3630 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -1690,9 +1690,9 @@ static BODY *decrypt_part (BODY *a, STATE *s, FILE *fpout, int is_smime, if (r_is_signed) *r_is_signed = 0; +restart: ctx = create_gpgme_context (is_smime); - restart: /* Make a data object from the body, create context etc. */ ciphertext = file_to_data_object (s->fpin, a->offset, a->length); if (!ciphertext) @@ -1735,6 +1735,9 @@ static BODY *decrypt_part (BODY *a, STATE *s, FILE *fpout, int is_smime, { maybe_signed = 1; gpgme_data_release (plaintext); + /* We release the context because recent versions of gpgme+gpgsm + * appear to end the session after an error */ + gpgme_release (ctx); goto restart; } } |