summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-29 21:59:37 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-29 21:59:37 +0200
commit1e04f49ddbfaa002ba930f2b79883ed3688e1ea8 (patch)
tree14d88b51cea67faec0b5edd4a8b3f05c93f9bb29 /source4/lib/ldb/common
parentbe7bff5eb59f903fdf8ea35f4dd330ec4313df76 (diff)
downloadsamba-1e04f49ddbfaa002ba930f2b79883ed3688e1ea8.tar.gz
samba-1e04f49ddbfaa002ba930f2b79883ed3688e1ea8.tar.bz2
samba-1e04f49ddbfaa002ba930f2b79883ed3688e1ea8.zip
ldb:ldb_dn - "ldb_dn_explode" - move the "dn->comp_num" initalisation upwards and use "LDB_FREE" for freeing "dn->components"
Mostly cosmetic - no behaviour change
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 5ce735f145..e2ac9ad0bd 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -331,8 +331,9 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
return true;
}
- /* make sure we free this if alloced previously before replacing */
- talloc_free(dn->components);
+ /* make sure we free this if allocated previously before replacing */
+ LDB_FREE(dn->components);
+ dn->comp_num = 0;
LDB_FREE(dn->ext_components);
dn->ext_comp_num = 0;
@@ -343,7 +344,6 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
if ( ! dn->components) {
return false;
}
- dn->comp_num = 0;
/* Components data space is allocated here once */
data = talloc_array(dn->components, char, strlen(parse_dn) + 1);