41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
From 1ffcc9aa9a397180fe35283ee61b164471d073fb Mon Sep 17 00:00:00 2001
|
|
From: Thierry Bordaz <tbordaz@redhat.com>
|
|
Date: Tue, 7 Jan 2025 10:01:51 +0100
|
|
Subject: [PATCH] Issue 6417 - (2nd) fix typo
|
|
|
|
---
|
|
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c | 10 ++++++----
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
|
|
index 1bbb6252a..e2b8273a2 100644
|
|
--- a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
|
|
+++ b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
|
|
@@ -1178,8 +1178,10 @@ entryrdn_lookup_dn(backend *be,
|
|
|
|
/* Just in case the suffix ID is not '1' retrieve it from the database */
|
|
keybuf = slapi_ch_strdup(slapi_sdn_get_ndn(be->be_suffix));
|
|
- dblayer_value_set(be, &key, keybuf, strlen(keybuf) + 1);
|
|
- rc = dblayer_cursor_op(&ctx.cursor, DBI_OP_MOVE_TO_KEY, &key, &data);
|
|
+ key.data = keybuf;
|
|
+ key.size = key.ulen = strlen(keybuf) + 1;
|
|
+ key.flags = DB_DBT_USERMEM;
|
|
+ rc = cursor->c_get(cursor, &key, &data, DB_SET);
|
|
if (rc) {
|
|
slapi_log_err(SLAPI_LOG_WARNING, "entryrdn_lookup_dn",
|
|
"Fails to retrieve the ID of suffix %s - keep the default value '%d'\n",
|
|
@@ -1189,8 +1191,8 @@ entryrdn_lookup_dn(backend *be,
|
|
elem = (rdn_elem *)data.data;
|
|
suffix_id = id_stored_to_internal(elem->rdn_elem_id);
|
|
}
|
|
- dblayer_value_free(be, &data);
|
|
- dblayer_value_free(be, &key);
|
|
+ slapi_ch_free(&data.data);
|
|
+ slapi_ch_free_string(&keybuf);
|
|
|
|
do {
|
|
/* Setting up a key for the node to get its parent */
|
|
--
|
|
2.48.0
|
|
|