summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/ldb_parse.c16
-rw-r--r--source4/lib/ldb/include/ldb_parse.h3
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c2
3 files changed, 5 insertions, 16 deletions
diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c
index 5221ef4556..e64e6d82d3 100644
--- a/source4/lib/ldb/common/ldb_parse.c
+++ b/source4/lib/ldb/common/ldb_parse.c
@@ -43,7 +43,6 @@
#include "includes.h"
#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
#include "ldb/include/ldb_parse.h"
#include <ctype.h>
@@ -327,22 +326,13 @@ static struct ldb_parse_tree *ldb_parse_filter(TALLOC_CTX *ctx, const char **s)
expression ::= <simple> | <filter>
*/
-struct ldb_parse_tree *ldb_parse_tree(struct ldb_context *ldb, const char *s)
+struct ldb_parse_tree *ldb_parse_tree(TALLOC_CTX *mem_ctx, const char *s)
{
while (isspace(*s)) s++;
if (*s == '(') {
- return ldb_parse_filter(ldb, &s);
+ return ldb_parse_filter(mem_ctx, &s);
}
- return ldb_parse_simple(ldb, s);
+ return ldb_parse_simple(mem_ctx, s);
}
-
-/*
- free a parse tree returned from ldb_parse_tree()
-*/
-void ldb_parse_tree_free(struct ldb_context *ldb, struct ldb_parse_tree *tree)
-{
- talloc_free(tree);
-}
-
diff --git a/source4/lib/ldb/include/ldb_parse.h b/source4/lib/ldb/include/ldb_parse.h
index d9125d05ed..50a9382534 100644
--- a/source4/lib/ldb/include/ldb_parse.h
+++ b/source4/lib/ldb/include/ldb_parse.h
@@ -54,7 +54,6 @@ struct ldb_parse_tree {
} u;
};
-struct ldb_parse_tree *ldb_parse_tree(struct ldb_context *ldb, const char *s);
-void ldb_parse_tree_free(struct ldb_context *ldb, struct ldb_parse_tree *tree);
+struct ldb_parse_tree *ldb_parse_tree(TALLOC_CTX *mem_ctx, const char *s);
#endif
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 7883ee6e7b..e036ae0966 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -506,7 +506,7 @@ int ltdb_search(struct ldb_module *module, const char *base,
}
}
- ldb_parse_tree_free(ldb, tree);
+ talloc_free(tree);
ltdb_unlock_read(module);
return ret;