mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
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@gnupg.org>
This commit is contained in:
parent
010d26a85b
commit
c97198371b
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user