summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-07-07 18:01:34 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-07-08 19:28:44 +0200
commit921308f1e830e0443bb49b6d4eb19ae95357a16e (patch)
treec1186188db4d70019bd35aaf3aaeea3a608b6e02 /source4
parent38896f3362073680da82259485dc1031e08f4d6c (diff)
downloadsamba-921308f1e830e0443bb49b6d4eb19ae95357a16e.tar.gz
samba-921308f1e830e0443bb49b6d4eb19ae95357a16e.tar.bz2
samba-921308f1e830e0443bb49b6d4eb19ae95357a16e.zip
s4:acl LDB module - move a "mem_ctx" creation to the place where it is actually checked
Memory allocations and their result checks should be as tight as possible.
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 2b0b19c726..39b8e9911f 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -129,7 +129,7 @@ static int acl_module_init(struct ldb_module *module)
struct ldb_context *ldb;
struct acl_private *data;
int ret, i;
- TALLOC_CTX *mem_ctx = talloc_new(module);
+ TALLOC_CTX *mem_ctx;
static const char *attrs[] = { "passwordAttribute", NULL };
struct ldb_result *res;
struct ldb_message *msg;
@@ -154,6 +154,7 @@ static int acl_module_init(struct ldb_module *module)
NULL, "acl", "perform", false);
ldb_module_set_private(module, data);
+ mem_ctx = talloc_new(module);
if (!mem_ctx) {
return ldb_oom(ldb);
}