summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/ldb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 0fab8472a9..9a26887b4b 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -411,7 +411,6 @@ static WERROR ldb_get_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
struct ldb_context *c = kd->ldb;
struct ldb_result *res;
int ret;
- char *query;
if (name == NULL) {
return WERR_INVALID_PARAM;
@@ -422,9 +421,8 @@ static WERROR ldb_get_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
return ldb_get_default_value(mem_ctx, k, NULL, data_type, data);
} else {
/* normal value */
- query = talloc_asprintf(mem_ctx, "(value=%s)", name);
- ret = ldb_search(c, mem_ctx, &res, kd->dn, LDB_SCOPE_ONELEVEL, NULL, "%s", query);
- talloc_free(query);
+ ret = ldb_search(c, mem_ctx, &res, kd->dn, LDB_SCOPE_ONELEVEL,
+ NULL, "(value=%s)", name);
if (ret != LDB_SUCCESS) {
DEBUG(0, ("Error getting values for '%s': %s\n",