git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77b4437
)
s3:idmap_tdb: simplify talloc usage with temp context from talloc_stackframe
author
Michael Adam
<obnox@samba.org>
Mon, 26 Jan 2009 12:17:49 +0000
(13:17 +0100)
committer
Michael Adam
<obnox@samba.org>
Fri, 6 Feb 2009 09:20:07 +0000
(10:20 +0100)
Michael
source3/winbindd/idmap_tdb.c
patch
|
blob
|
history
diff --git
a/source3/winbindd/idmap_tdb.c
b/source3/winbindd/idmap_tdb.c
index 191691fefa5ae9c2c1fddae97a48ecc5f1603cfc..3a64979f339d7426834b355dd41beca5ab3a93ca 100644
(file)
--- 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;