summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/reg_backend_dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/reg_backend_dir.c b/source4/lib/registry/reg_backend_dir.c
index beedc0615b..8348f6c38a 100644
--- a/source4/lib/registry/reg_backend_dir.c
+++ b/source4/lib/registry/reg_backend_dir.c
@@ -99,9 +99,9 @@ static WERROR reg_dir_key_by_index(TALLOC_CTX *mem_ctx, const struct registry_ke
if(S_ISDIR(stbuf.st_mode)) {
if(i == idx) {
(*key) = talloc(mem_ctx, struct registry_key);
- (*key)->name = e->d_name;
+ (*key)->name = talloc_strdup(*key, e->d_name);
(*key)->path = NULL;
- (*key)->backend_data = talloc_strdup(mem_ctx, thispath);
+ (*key)->backend_data = talloc_strdup(*key, thispath);
SAFE_FREE(thispath);
closedir(d);
return WERR_OK;