diff options
author | Michael Adam <obnox@samba.org> | 2009-01-26 13:17:49 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-02-06 10:20:07 +0100 |
commit | 9c626e37cf74f94a35c0b03feaf6bec6e3604811 (patch) | |
tree | f867a883d6abdb7d00937274430d137bd8827e93 /source3/winbindd | |
parent | 77b4437b123f50612e40d521fe3d5faf5932808b (diff) | |
download | samba-9c626e37cf74f94a35c0b03feaf6bec6e3604811.tar.gz samba-9c626e37cf74f94a35c0b03feaf6bec6e3604811.tar.bz2 samba-9c626e37cf74f94a35c0b03feaf6bec6e3604811.zip |
s3:idmap_tdb: simplify talloc usage with temp context from talloc_stackframe
Michael
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/idmap_tdb.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 191691fefa..3a64979f33 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; |