diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_cachehook.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index bb190411ee..705d08abf8 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -69,6 +69,7 @@ bool reghook_cache_init( void ) bool reghook_cache_add(const char *keyname, REGISTRY_OPS *ops) { + bool ret; char *key = NULL; key = keyname_to_path(talloc_tos(), keyname); @@ -80,7 +81,9 @@ bool reghook_cache_add(const char *keyname, REGISTRY_OPS *ops) DEBUG(10, ("reghook_cache_add: Adding ops %p for key [%s]\n", (void *)ops, key)); - return pathtree_add(cache_tree, key, ops); + ret = pathtree_add(cache_tree, key, ops); + TALLOC_FREE(key); + return ret; } /********************************************************************** |