diff options
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_util_legacy.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/registry/reg_util_legacy.c b/source3/registry/reg_util_legacy.c index c99e66a408..50bc8b92cc 100644 --- a/source3/registry/reg_util_legacy.c +++ b/source3/registry/reg_util_legacy.c @@ -36,13 +36,14 @@ WERROR regkey_open_internal(TALLOC_CTX *ctx, { struct registry_key *key; WERROR err; + TALLOC_CTX *tmp_ctx = talloc_stackframe(); - err = reg_open_path(NULL, path, access_desired, token, &key); + err = reg_open_path(tmp_ctx, path, access_desired, token, &key); if (!W_ERROR_IS_OK(err)) { return err; } *regkey = talloc_move(ctx, &key->key); - TALLOC_FREE(key); + TALLOC_FREE(tmp_ctx); return WERR_OK; } |