summaryrefslogtreecommitdiffstats
path: root/servers/slapd/back-meta/modify.c
diff options
context:
space:
mode:
Diffstat (limited to 'servers/slapd/back-meta/modify.c')
-rw-r--r--servers/slapd/back-meta/modify.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/servers/slapd/back-meta/modify.c b/servers/slapd/back-meta/modify.c
index 459e835..9485eee 100644
--- a/servers/slapd/back-meta/modify.c
+++ b/servers/slapd/back-meta/modify.c
@@ -1,7 +1,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2022 The OpenLDAP Foundation.
+ * Copyright 1999-2024 The OpenLDAP Foundation.
* Portions Copyright 2001-2003 Pierangelo Masarati.
* Portions Copyright 1999-2003 Howard Chu.
* All rights reserved.
@@ -49,9 +49,12 @@ meta_back_modify( Operation *op, SlapReply *rs )
int msgid;
ldap_back_send_t retrying = LDAP_BACK_RETRYING;
LDAPControl **ctrls = NULL;
+ SlapReply *candidates = NULL;
- mc = meta_back_getconn( op, rs, &candidate, LDAP_BACK_SENDERR );
- if ( !mc || !meta_back_dobind( op, rs, mc, LDAP_BACK_SENDERR ) ) {
+ candidates = meta_back_candidates_get( op );
+ mc = meta_back_getconn( op, rs, &candidate, LDAP_BACK_SENDERR, candidates );
+ if ( !mc || !meta_back_dobind( op, rs, mc, LDAP_BACK_SENDERR, candidates ) ) {
+ op->o_tmpfree( candidates, op->o_tmpmemctx );
return rs->sr_err;
}
@@ -180,7 +183,7 @@ retry:;
mt->mt_timeout[ SLAP_OP_MODIFY ], ( LDAP_BACK_SENDRESULT | retrying ) );
if ( rs->sr_err == LDAP_UNAVAILABLE && retrying ) {
retrying &= ~LDAP_BACK_RETRYING;
- if ( meta_back_retry( op, rs, &mc, candidate, LDAP_BACK_SENDERR ) ) {
+ if ( meta_back_retry( op, rs, &mc, candidate, LDAP_BACK_SENDERR, candidates ) ) {
/* if the identity changed, there might be need to re-authz */
(void)mi->mi_ldap_extra->controls_free( op, rs, &ctrls );
goto retry;
@@ -205,6 +208,7 @@ cleanup:;
meta_back_release_conn( mi, mc );
}
+ op->o_tmpfree( candidates, op->o_tmpmemctx );
return rs->sr_err;
}