summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-29 22:07:51 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-29 22:07:51 +0200
commitf1e92c91b21b354802b8e342e414d62368820b43 (patch)
tree5a558285f956147345bdbfccf3d99e3af382f571 /source4/lib/ldb/common
parent0f0d9aa9b5959a12385c2b79d7dd35e9d081033c (diff)
downloadsamba-f1e92c91b21b354802b8e342e414d62368820b43.tar.gz
samba-f1e92c91b21b354802b8e342e414d62368820b43.tar.bz2
samba-f1e92c91b21b354802b8e342e414d62368820b43.zip
ldb:ldb_dn.c - "ldb_dn_set_extended_component" - free the linearized string when the components change
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c6
1 files changed, 4 insertions, 2 deletions
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;
}