summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-25 15:12:52 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-28 10:23:56 +1000
commit12936bee690e5be8d34f7da288a8620d8b50c676 (patch)
tree00a648bb83e9bc69f5aab5fe2189f6ebfa640b2a /source4
parenta130ad27c4d913f9d8a8f4bf3fde6c44ba33587d (diff)
downloadsamba-12936bee690e5be8d34f7da288a8620d8b50c676.tar.gz
samba-12936bee690e5be8d34f7da288a8620d8b50c676.tar.bz2
samba-12936bee690e5be8d34f7da288a8620d8b50c676.zip
s4-samdb: free the linked_attributes list on prepare commit failure
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/linked_attributes.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index b4144efe3f..0bb9ecc7ed 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -1212,6 +1212,8 @@ static int linked_attributes_prepare_commit(struct ldb_module *module)
talloc_get_type(ldb_module_get_private(module), struct la_private);
struct la_context *ac;
+ DEBUG(0,(__location__ ": prepare commit starting\n"));
+
/* walk the list backwards, to do the first entry first, as we
* added the entries with DLIST_ADD() which puts them at the
* start of the list */
@@ -1223,12 +1225,16 @@ static int linked_attributes_prepare_commit(struct ldb_module *module)
ret = la_do_mod_request(module, ac);
if (ret != LDB_SUCCESS) {
DEBUG(0,(__location__ ": Failed mod request ret=%d\n", ret));
+ talloc_free(la_private);
+ ldb_module_set_private(module, NULL);
return ret;
}
}
talloc_free(la_private);
ldb_module_set_private(module, NULL);
+
+ DEBUG(0,(__location__ ": prepare commit done\n"));
return ldb_next_prepare_commit(module);
}