diff options
author | Michael Adam <obnox@samba.org> | 2008-03-17 01:27:27 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-17 08:22:33 +0100 |
commit | 40e6ec16ee51d81ad75fb80bf4658796614ffa1a (patch) | |
tree | 8bb1cd9d90d06180f4fdfdd1dea1b51975d9fbaa | |
parent | 2ce3d4b918d078c7ba1ad9b55ce3ba51ff8e6951 (diff) | |
download | samba-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)
-rw-r--r-- | source3/registry/reg_backend_db.c | 6 |
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, |