summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/common/reg_interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index f5c3598721..e48fe38eb9 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -273,10 +273,10 @@ WERROR reg_key_num_subkeys(struct registry_key *key, int *count)
if(key->hive->functions->get_subkey_by_index) {
int i;
WERROR error;
- struct registry_key *dest;
+ struct registry_key *dest = NULL;
TALLOC_CTX *mem_ctx = talloc_init("num_subkeys");
- for(i = 0; W_ERROR_IS_OK(error = key->hive->functions->get_subkey_by_index(mem_ctx, key, i, &dest)); i++);
+ for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(mem_ctx, key, i, &dest)); i++);
talloc_destroy(mem_ctx);
*count = i;