summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2010-06-24 20:48:07 +0300
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-30 09:17:44 +0200
commit6abfe8904a1024512c0ea8bb4844e4409e8d994b (patch)
tree6b7bbfd5d3a877493f596a8b52b1032bc72b2a45 /source4
parent2821abee1f85c5d9a191a9880808b7022ac2e0b1 (diff)
downloadsamba-6abfe8904a1024512c0ea8bb4844e4409e8d994b.tar.gz
samba-6abfe8904a1024512c0ea8bb4844e4409e8d994b.tar.bz2
samba-6abfe8904a1024512c0ea8bb4844e4409e8d994b.zip
s4:schema/schema_set.c - free LDB message diffs
Especially the "free"s after "ldb_msg_diff" are very important since the diff message is allocated on the long-living LDB context. Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/schema/schema_set.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index 0e04f5b35e..b5d8ae47f5 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -140,6 +140,7 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
if (mod_msg->num_elements > 0) {
ret = dsdb_replace(ldb, mod_msg, 0);
}
+ talloc_free(mod_msg);
}
if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS || ret == LDB_ERR_INVALID_DN_SYNTAX) {
@@ -168,6 +169,7 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
if (mod_msg->num_elements > 0) {
ret = dsdb_replace(ldb, mod_msg, 0);
}
+ talloc_free(mod_msg);
}
if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS || ret == LDB_ERR_INVALID_DN_SYNTAX) {
/* We might be on a read-only DB */