From c89d0db64f21bda7283d31ddaf58e83c9bff6020 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 2 Dec 2006 17:09:20 +0000 Subject: [PATCH] fix deadlock in case of bind error; propagate error as appropriate --- servers/slapd/back-meta/search.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 39e886b822..c5627d56d1 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -271,7 +271,7 @@ other:; LDAP_BACK_CONN_BINDING_CLEAR( msc ); if ( META_BACK_ONERR_STOP( mi ) ) { LDAP_BACK_CONN_TAINTED_SET( mc ); - meta_back_release_conn( op, mc ); + meta_back_release_conn_lock( op, mc, 0 ); *mcp = NULL; retcode = META_SEARCH_ERR; @@ -323,9 +323,10 @@ meta_search_dobind_result( if ( rc != LDAP_SUCCESS ) { if ( META_BACK_ONERR_STOP( mi ) ) { LDAP_BACK_CONN_TAINTED_SET( mc ); - meta_back_release_conn( op, mc ); + meta_back_release_conn_lock( op, mc, 0 ); *mcp = NULL; retcode = META_SEARCH_ERR; + rs->sr_err = rc; } else if ( META_BACK_ONERR_REPORT( mi ) ) { candidates[ candidate ].sr_err = rc; -- 2.39.5