summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-29 22:10:14 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-29 22:13:05 +0200
commit657045ca9aa4abe11088127a05d697e5ae99a5c9 (patch)
tree93f23b2c7477273c5ef8d740e004cdce09f1e66e
parentf1e92c91b21b354802b8e342e414d62368820b43 (diff)
downloadsamba-657045ca9aa4abe11088127a05d697e5ae99a5c9.tar.gz
samba-657045ca9aa4abe11088127a05d697e5ae99a5c9.tar.bz2
samba-657045ca9aa4abe11088127a05d697e5ae99a5c9.zip
s4:ldb - "ldb_dn_update_components" - fix free of invalid DN parts
Use "LDB_FREE" for such free operations and in addition wipe also the casefolded DN out.
-rw-r--r--source4/lib/ldb/common/ldb_dn.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 11de31ed6b..f81f1a4d93 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -2037,10 +2037,9 @@ int ldb_dn_update_components(struct ldb_dn *dn, const struct ldb_dn *ref_dn)
sizeof(struct ldb_dn_component)*ref_dn->comp_num);
dn->comp_num = ref_dn->comp_num;
- talloc_free(dn->linearized);
- talloc_free(dn->ext_linearized);
- dn->ext_linearized = NULL;
- dn->linearized = NULL;
+ LDB_FREE(dn->casefold);
+ LDB_FREE(dn->linearized);
+ LDB_FREE(dn->ext_linearized);
return LDB_SUCCESS;
}