[git] GnuPG - branch, master, updated. gnupg-2.1.5-12-gc971983
by Werner Koch
cvs at cvs.gnupg.org
Thu Jun 18 13:37:30 CEST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via c97198371b7307e64afdd323231977b2247f64ec (commit)
from 010d26a85bfe15c4aa12eefeab851dbde0609c26 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c97198371b7307e64afdd323231977b2247f64ec
Author: Werner Koch <wk at gnupg.org>
Date: Thu Jun 18 13:34:48 2015 +0200
dirmngr: Fix the cleanup zombies fix (685b782).
* dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Do not close the
stdout reader after EOF from read_log_data.
* dirmngr/crlcache.c (crl_cache_reload_crl): Close the reader before
the next iteration.
--
I assumed that the log_fd also has a reader object but that reader
object is used for stdout and needs to be closed by the consumer.
The real bug with the non-released ldap_wrapper control objects was
that when looping over distribution points we did not closed the used
reader object before the next iteration. Now, the test case had more
than one DP and thus we lost one reader object.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c
index d4c3dcb..a0a5104 100644
--- a/dirmngr/crlcache.c
+++ b/dirmngr/crlcache.c
@@ -2525,6 +2525,9 @@ crl_cache_reload_crl (ctrl_t ctrl, ksba_cert_t cert)
issuername_uri = ksba_name_get_uri (issuername, 0);
ksba_name_release (issuername); issuername = NULL;
+ /* Close the reader. */
+ crl_close_reader (reader);
+ reader = NULL;
}
if (gpg_err_code (err) == GPG_ERR_EOF)
err = 0;
@@ -2535,11 +2538,8 @@ crl_cache_reload_crl (ctrl_t ctrl, ksba_cert_t cert)
if (opt.verbose)
log_info ("no distribution point - trying issuer name\n");
- if (reader)
- {
- crl_close_reader (reader);
- reader = NULL;
- }
+ crl_close_reader (reader);
+ reader = NULL;
issuer = ksba_cert_get_issuer (cert, 0);
if (!issuer)
@@ -2571,8 +2571,7 @@ crl_cache_reload_crl (ctrl_t ctrl, ksba_cert_t cert)
}
leave:
- if (reader)
- crl_close_reader (reader);
+ crl_close_reader (reader);
xfree (distpoint_uri);
xfree (issuername_uri);
ksba_name_release (distpoint);
diff --git a/dirmngr/ldap-wrapper.c b/dirmngr/ldap-wrapper.c
index 0dcc7ba..a54e405 100644
--- a/dirmngr/ldap-wrapper.c
+++ b/dirmngr/ldap-wrapper.c
@@ -325,8 +325,6 @@ ldap_wrapper_thread (void *dummy)
{
if (read_log_data (ctx))
{
- ksba_reader_release (ctx->reader);
- ctx->reader = NULL;
SAFE_CLOSE (ctx->log_fd);
any_action = 1;
}
-----------------------------------------------------------------------
Summary of changes:
dirmngr/crlcache.c | 13 ++++++-------
dirmngr/ldap-wrapper.c | 2 --
2 files changed, 6 insertions(+), 9 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list