From 9c626e37cf74f94a35c0b03feaf6bec6e3604811 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 26 Jan 2009 13:17:49 +0100 Subject: [PATCH] s3:idmap_tdb: simplify talloc usage with temp context from talloc_stackframe Michael --- source3/winbindd/idmap_tdb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 191691fefa5..3a64979f339 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -258,14 +258,10 @@ static NTSTATUS idmap_tdb_open_db(TALLOC_CTX *memctx, } /* use our own context here */ - ctx = talloc_new(memctx); - if (!ctx) { - DEBUG(0, ("Out of memory!\n")); - return NT_STATUS_NO_MEMORY; - } + ctx = talloc_stackframe(); /* use the old database if present */ - tdbfile = talloc_strdup(ctx, state_path("winbindd_idmap.tdb")); + tdbfile = state_path("winbindd_idmap.tdb"); if (!tdbfile) { DEBUG(0, ("Out of memory!\n")); ret = NT_STATUS_NO_MEMORY;