summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-03-15 12:36:52 +0100
committerMichael Adam <obnox@samba.org>2010-03-16 00:12:25 +0100
commit9a825dc770bfcb0923572e8ad3beff2f86dce992 (patch)
tree5e175b540a53b158f1098bb9457b030c23f61c7d
parentc27c430b21cae3d5906dc211cb29fa7d47e15699 (diff)
downloadsamba-9a825dc770bfcb0923572e8ad3beff2f86dce992.tar.gz
samba-9a825dc770bfcb0923572e8ad3beff2f86dce992.tar.bz2
samba-9a825dc770bfcb0923572e8ad3beff2f86dce992.zip
s3:registry-legacy: use talloc_stackframe() instead of NULL in regkey_open_internal()
Michael
-rw-r--r--source3/registry/reg_util_legacy.c5
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;
}