From 0264c1792d951eb212490b1d89d4ba9a635931d5 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Sat, 11 Jun 2005 03:20:26 +0000 Subject: r7480: ldb_sqlite3 work in progress (This used to be commit 510e7994da808ab12f51fa7a36c3f5f9244c51ac) --- source4/lib/ldb/common/ldb_explode_dn.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source4/lib/ldb/common') diff --git a/source4/lib/ldb/common/ldb_explode_dn.c b/source4/lib/ldb/common/ldb_explode_dn.c index f015ce81c7..cacd9862b6 100644 --- a/source4/lib/ldb/common/ldb_explode_dn.c +++ b/source4/lib/ldb/common/ldb_explode_dn.c @@ -377,8 +377,7 @@ ldb_explode_dn(void * mem_ctx, */ /* allocate space for the normalized component */ - if ((component->component = - dest = talloc_size(component, size)) == NULL) { + if ((dest = talloc_size(component, size)) == NULL) { goto failed; } @@ -396,6 +395,9 @@ 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); @@ -432,7 +434,7 @@ ldb_explode_dn(void * mem_ctx, } /* rebuild the normalized DN */ - if ((dn->dn = dest = talloc_size(dn, size)) == NULL) { + if ((dest = talloc_size(dn, size)) == NULL) { goto failed; } @@ -453,6 +455,9 @@ 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 */ -- cgit