summaryrefslogtreecommitdiff
path: root/source4/lib/registry/reg_backend_ldb.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-12-10 23:13:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:30 -0500
commit0bde7a2944fded24af8a9b19a3bb42015bbdd6bb (patch)
tree6ce059fe9ad4b8e895624d7dc9ec3332e51f7121 /source4/lib/registry/reg_backend_ldb.c
parentf0eff2525b8df834765a7162007bc8b4565e9a58 (diff)
downloadsamba-0bde7a2944fded24af8a9b19a3bb42015bbdd6bb.tar.gz
samba-0bde7a2944fded24af8a9b19a3bb42015bbdd6bb.tar.bz2
samba-0bde7a2944fded24af8a9b19a3bb42015bbdd6bb.zip
r4141: Fix crash bug in ldb backend
(This used to be commit 5f64a60374486b9fc3d75786c3035a9017dd4d33)
Diffstat (limited to 'source4/lib/registry/reg_backend_ldb.c')
-rw-r--r--source4/lib/registry/reg_backend_ldb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/lib/registry/reg_backend_ldb.c b/source4/lib/registry/reg_backend_ldb.c
index b20a56046d..e848507634 100644
--- a/source4/lib/registry/reg_backend_ldb.c
+++ b/source4/lib/registry/reg_backend_ldb.c
@@ -196,12 +196,12 @@ static WERROR ldb_open_hive(struct registry_hive *hive, struct registry_key **k)
ldb_set_debug_stderr(c);
hive->backend_data = c;
- hive->root = talloc_zero_p(hive, struct registry_key);
- talloc_set_destructor (hive->root, reg_close_ldb_key);
+ *k = talloc_zero_p(hive, struct registry_key);
+ talloc_set_destructor (*k, reg_close_ldb_key);
talloc_set_destructor (hive, ldb_close_hive);
- hive->root->name = talloc_strdup(hive->root, "");
- hive->root->backend_data = kd = talloc_zero_p(hive->root, struct ldb_key_data);
- kd->dn = talloc_strdup(hive->root, "key=root");
+ (*k)->name = talloc_strdup(*k, "");
+ (*k)->backend_data = kd = talloc_zero_p(*k, struct ldb_key_data);
+ kd->dn = talloc_strdup(*k, "key=root");
return WERR_OK;