Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.
[gd/samba/.git] / source4 / dsdb / samdb / ldb_modules / kludge_acl.c
index bc998a835a9de7669a51a70174b164082fc5004b..6836f95873ef81b61a0e8f7f41d2b0913157865b 100644 (file)
@@ -409,14 +409,12 @@ static int kludge_acl_init(struct ldb_module *module)
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
-       ret = ldb_search(module->ldb, ldb_dn_new(mem_ctx, module->ldb, "@KLUDGEACL"),
-                        LDB_SCOPE_BASE,
-                        NULL, attrs,
-                        &res);
+       ret = ldb_search(module->ldb, mem_ctx, &res,
+                        ldb_dn_new(mem_ctx, module->ldb, "@KLUDGEACL"),
+                        LDB_SCOPE_BASE, attrs, NULL);
        if (ret != LDB_SUCCESS) {
                goto done;
        }
-       talloc_steal(mem_ctx, res);
        if (res->count == 0) {
                goto done;
        }