From 47fafe801b5a4a054dcde301b892cda9c0ababb0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 26 Feb 2010 15:48:02 +0100 Subject: s4:ldb_dn: remove dn->ext_linearized when ext_components is modified. metze --- source4/lib/ldb/common/ldb_dn.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index c5c8c2e065..ef4cead0e1 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -894,6 +894,7 @@ void ldb_dn_extended_filter(struct ldb_dn *dn, const char * const *accept) i--; } } + LDB_FREE(dn->ext_linearized); } @@ -1424,9 +1425,7 @@ bool ldb_dn_add_base(struct ldb_dn *dn, struct ldb_dn *base) /* Wipe the ext_linearized DN, * the GUID and SID are almost certainly no longer valid */ - if (dn->ext_linearized) { - LDB_FREE(dn->ext_linearized); - } + LDB_FREE(dn->ext_linearized); LDB_FREE(dn->ext_components); dn->ext_comp_num = 0; @@ -1935,6 +1934,7 @@ int ldb_dn_set_extended_component(struct ldb_dn *dn, } return LDB_SUCCESS; } + LDB_FREE(dn->ext_linearized); } } @@ -1972,6 +1972,7 @@ void ldb_dn_remove_extended_components(struct ldb_dn *dn) { dn->ext_comp_num = 0; LDB_FREE(dn->ext_components); + LDB_FREE(dn->ext_linearized); } bool ldb_dn_is_valid(struct ldb_dn *dn) -- cgit