summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-17 01:27:27 +0100
committerMichael Adam <obnox@samba.org>2008-03-17 08:22:33 +0100
commit40e6ec16ee51d81ad75fb80bf4658796614ffa1a (patch)
tree8bb1cd9d90d06180f4fdfdd1dea1b51975d9fbaa /source3
parent2ce3d4b918d078c7ba1ad9b55ce3ba51ff8e6951 (diff)
downloadsamba-40e6ec16ee51d81ad75fb80bf4658796614ffa1a.tar.gz
samba-40e6ec16ee51d81ad75fb80bf4658796614ffa1a.tar.bz2
samba-40e6ec16ee51d81ad75fb80bf4658796614ffa1a.zip
registry: use talloc_stackframe instead of hand crafted temporary context.
Michael (This used to be commit e4f2c856ec716697af4815491b5ae8ddb263cd51)
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_backend_db.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 8d9fdf2282..c13e0ec3f1 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -912,15 +912,11 @@ static WERROR regdb_set_secdesc(const char *key,
struct security_descriptor *secdesc)
{
prs_struct ps;
- TALLOC_CTX *mem_ctx;
+ TALLOC_CTX *mem_ctx = talloc_stackframe();
char *tdbkey;
WERROR err = WERR_NOMEM;
TDB_DATA tdbdata;
- if (!(mem_ctx = talloc_init("regdb_set_secdesc"))) {
- return WERR_NOMEM;
- }
-
ZERO_STRUCT(ps);
if (!(tdbkey = talloc_asprintf(mem_ctx, "%s/%s", REG_SECDESC_PREFIX,