From 05f1a5b4ee5b6d5d8388a2da1ef8898c1e3a4594 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 17 Mar 2008 01:27:27 +0100 Subject: [PATCH] registry: use talloc_stackframe instead of hand crafted temporary context. Michael (cherry picked from commit e4f2c856ec716697af4815491b5ae8ddb263cd51) --- source/registry/reg_backend_db.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/registry/reg_backend_db.c b/source/registry/reg_backend_db.c index 8d9fdf2282c..c13e0ec3f14 100644 --- a/source/registry/reg_backend_db.c +++ b/source/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, -- 2.11.4.GIT