diff options
author | Derrell Lipman <derrell@samba.org> | 2005-06-11 03:20:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:57 -0500 |
commit | 0264c1792d951eb212490b1d89d4ba9a635931d5 (patch) | |
tree | 66d9eb83fc0750879c5621f22c15dda240739f6d /source4/lib/ldb/common | |
parent | 43d3689ecfbac71e78132ac94470081e3db79951 (diff) | |
download | samba-0264c1792d951eb212490b1d89d4ba9a635931d5.tar.gz samba-0264c1792d951eb212490b1d89d4ba9a635931d5.tar.bz2 samba-0264c1792d951eb212490b1d89d4ba9a635931d5.zip |
r7480: ldb_sqlite3 work in progress
(This used to be commit 510e7994da808ab12f51fa7a36c3f5f9244c51ac)
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r-- | source4/lib/ldb/common/ldb_explode_dn.c | 11 |
1 files changed, 8 insertions, 3 deletions
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 */ |