summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-05 17:45:51 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-06 20:44:01 +0200
commit45171d61083339a624a83a1412602475ce7978a6 (patch)
tree9b3b601bf59224a3636d4972a5972f07f8fcbef9 /source4/dsdb/samdb/ldb_modules
parent787a42ef9972eca3f3889e2ad8b5e890b7c551fd (diff)
downloadsamba-45171d61083339a624a83a1412602475ce7978a6.tar.gz
samba-45171d61083339a624a83a1412602475ce7978a6.tar.bz2
samba-45171d61083339a624a83a1412602475ce7978a6.zip
s4:ridalloc LDB module - add more "talloc_free"s where useful
Some were missing on failure return branches.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/ridalloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/ridalloc.c b/source4/dsdb/samdb/ldb_modules/ridalloc.c
index 05aee77638..e54d6b4954 100644
--- a/source4/dsdb/samdb/ldb_modules/ridalloc.c
+++ b/source4/dsdb/samdb/ldb_modules/ridalloc.c
@@ -194,11 +194,13 @@ static int ridalloc_create_rid_set_ntds(struct ldb_module *module, TALLOC_CTX *m
rid_set_dn = ldb_dn_copy(tmp_ctx, machine_dn);
if (rid_set_dn == NULL) {
ldb_module_oom(module);
+ talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
if (! ldb_dn_add_child_fmt(rid_set_dn, "CN=RID Set")) {
ldb_module_oom(module);
+ talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -507,6 +509,7 @@ int ridalloc_allocate_rid(struct ldb_module *module, uint32_t *rid)
uint64_t new_pool;
ret = ridalloc_refresh_own_pool(module, &new_pool);
if (ret != LDB_SUCCESS) {
+ talloc_free(tmp_ctx);
return ret;
}
ret = dsdb_module_constrainted_update_integer(module, rid_set_dn, "rIDPreviousAllocationPool",