From 1e04f49ddbfaa002ba930f2b79883ed3688e1ea8 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 29 Jun 2010 21:59:37 +0200 Subject: 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 --- source4/lib/ldb/common/ldb_dn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/lib') 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); -- cgit