diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-12-27 00:32:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:39 -0500 |
commit | dcff66281cc7da27b06d605af90fed74076da19f (patch) | |
tree | ca28104a24b7832d41d929cd9f8fb3ef99a18579 /source4/lib | |
parent | f0d3e9de7e06f32a152d2984c31afd75cdb3abe9 (diff) | |
download | samba-dcff66281cc7da27b06d605af90fed74076da19f.tar.gz samba-dcff66281cc7da27b06d605af90fed74076da19f.tar.bz2 samba-dcff66281cc7da27b06d605af90fed74076da19f.zip |
r4373: Support setting values and fix a segfault
(This used to be commit cdb6980cdcf4b093e98b3b025f784333d46ac957)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 4 |
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; |