summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-26 15:48:02 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-26 23:26:34 +0100
commit47fafe801b5a4a054dcde301b892cda9c0ababb0 (patch)
tree5fd6ba86a44da16303c3d5bd367f1fd208657654
parentc7432e49506561316f42bf0a26dd21de563c8eda (diff)
downloadsamba-47fafe801b5a4a054dcde301b892cda9c0ababb0.tar.gz
samba-47fafe801b5a4a054dcde301b892cda9c0ababb0.tar.bz2
samba-47fafe801b5a4a054dcde301b892cda9c0ababb0.zip
s4:ldb_dn: remove dn->ext_linearized when ext_components is modified.
metze
-rw-r--r--source4/lib/ldb/common/ldb_dn.c7
1 files changed, 4 insertions, 3 deletions
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)