From 657045ca9aa4abe11088127a05d697e5ae99a5c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Tue, 29 Jun 2010 22:10:14 +0200 Subject: [PATCH] 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. --- source4/lib/ldb/common/ldb_dn.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index 11de31ed6b0..f81f1a4d932 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; } -- 2.34.1