s4:subtree_rename LDB module - "subren_ctx_init" - fix the "out of memory" return
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 31 Jul 2010 19:26:38 +0000 (21:26 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 31 Jul 2010 19:33:33 +0000 (21:33 +0200)
source4/dsdb/samdb/ldb_modules/subtree_rename.c

index 6d79db1fb0e5fcba3fb4396d39db89d6efcdb631..49cf9a7e8bf3bafa24ca5ea2a38ba43d897c89fa 100644 (file)
@@ -47,7 +47,7 @@ struct subtree_rename_context {
 };
 
 static struct subtree_rename_context *subren_ctx_init(struct ldb_module *module,
-                                        struct ldb_request *req)
+                                                     struct ldb_request *req)
 {
        struct ldb_context *ldb;
        struct subtree_rename_context *ac;
@@ -56,7 +56,6 @@ static struct subtree_rename_context *subren_ctx_init(struct ldb_module *module,
 
        ac = talloc_zero(req, struct subtree_rename_context);
        if (ac == NULL) {
-               ldb_oom(ldb);
                return NULL;
        }
 
@@ -241,7 +240,7 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req)
 
        ac = subren_ctx_init(module, req);
        if (!ac) {
-               return ldb_operr(ldb);
+               return ldb_oom(ldb);
        }
 
        /* add this entry as the first to do */