From f1e92c91b21b354802b8e342e414d62368820b43 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 29 Jun 2010 22:07:51 +0200 Subject: ldb:ldb_dn.c - "ldb_dn_set_extended_component" - free the linearized string when the components change --- source4/lib/ldb/common/ldb_dn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index c4805f7243..11de31ed6b 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -1925,7 +1925,6 @@ int ldb_dn_set_extended_component(struct ldb_dn *dn, ldb_dn_mark_invalid(dn); return LDB_ERR_OPERATIONS_ERROR; } - return LDB_SUCCESS; } else { if (i != (dn->ext_comp_num - 1)) { memmove(&dn->ext_components[i], @@ -1943,9 +1942,10 @@ int ldb_dn_set_extended_component(struct ldb_dn *dn, ldb_dn_mark_invalid(dn); return LDB_ERR_OPERATIONS_ERROR; } - return LDB_SUCCESS; } LDB_FREE(dn->ext_linearized); + + return LDB_SUCCESS; } } @@ -1976,6 +1976,8 @@ int ldb_dn_set_extended_component(struct ldb_dn *dn, dn->ext_components = p; dn->ext_comp_num++; + LDB_FREE(dn->ext_linearized); + return LDB_SUCCESS; } -- cgit