Skip to content
Snippets Groups Projects
Commit e4d24ecc authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

don't leave dangling conns in the AVL tree

parent 5b317f5b
No related branches found
No related tags found
No related merge requests found
......@@ -1418,14 +1418,16 @@ ldap_back_retry( ldapconn_t **lcp, Operation *op, SlapReply *rs, ldap_back_send_
if ( rc != LDAP_SUCCESS ) {
rc = 0;
/* freeit, because lc_refcnt == 1 */
(void)ldap_back_conn_free( *lcp );
(*lcp)->lc_refcnt = 0;
(void)ldap_back_freeconn( op, *lcp, 0 );
*lcp = NULL;
} else {
rc = ldap_back_dobind_int( *lcp, op, rs, sendok, 0, 0 );
if ( rc == 0 && *lcp != NULL ) {
/* freeit, because lc_refcnt == 1 */
(void)ldap_back_conn_free( *lcp );
(*lcp)->lc_refcnt = 0;
(void)ldap_back_freeconn( op, *lcp, 0 );
*lcp = NULL;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment