diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_cachehook.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index c7f099e134..db07330820 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -56,16 +56,17 @@ static char *keyname_to_path(TALLOC_CTX *mem_ctx, const char *keyname) WERROR reghook_cache_init(void) { - if (cache_tree == NULL) { - cache_tree = pathtree_init(®db_ops, NULL); - if (cache_tree == NULL) { - return WERR_NOMEM; - } - DEBUG(10, ("reghook_cache_init: new tree with default " - "ops %p for key [%s]\n", (void *)®db_ops, - KEY_TREE_ROOT)); + if (cache_tree != NULL) { + return WERR_OK; } + cache_tree = pathtree_init(®db_ops, NULL); + if (cache_tree == NULL) { + return WERR_NOMEM; + } + DEBUG(10, ("reghook_cache_init: new tree with default " + "ops %p for key [%s]\n", (void *)®db_ops, + KEY_TREE_ROOT)); return WERR_OK; } |