summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_explode_dn.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common/ldb_explode_dn.c')
-rw-r--r--source4/lib/ldb/common/ldb_explode_dn.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/ldb/common/ldb_explode_dn.c b/source4/lib/ldb/common/ldb_explode_dn.c
index cacd9862b6..5cea4424b0 100644
--- a/source4/lib/ldb/common/ldb_explode_dn.c
+++ b/source4/lib/ldb/common/ldb_explode_dn.c
@@ -382,6 +382,9 @@ ldb_explode_dn(void * mem_ctx,
goto failed;
}
+ /* Save the pointer to the beginning of the string */
+ component->component = dest;
+
/* copy each of the attributes to the normalized component */
for (i = 0; i < component->attr_num; i++) {
if (i != 0) {
@@ -395,9 +398,6 @@ ldb_explode_dn(void * mem_ctx,
dest += size;
}
- /* Save the just-generated string */
- component->component = dest;
-
ldb_debug(mem_ctx,
LDB_DEBUG_TRACE,
"component: [%s]\n", component->component);
@@ -438,6 +438,9 @@ ldb_explode_dn(void * mem_ctx,
goto failed;
}
+ /* Save the pointer to the beginning of the */
+ dn->dn = dest;
+
/* copy the normalized components into the DN */
for (i = 0; i < dn->comp_num; i++) {
@@ -455,9 +458,6 @@ ldb_explode_dn(void * mem_ctx,
dest += size;
}
- /* Save the just-generated string */
- dn->dn = dest;
-
ldb_debug(mem_ctx, LDB_DEBUG_TRACE, "dn: [%s]\n", dn->dn);
/* we don't need the copy of the DN any more */