summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-01-30 15:46:47 +0100
committerMichael Adam <obnox@samba.org>2013-02-05 17:36:35 +0100
commit50e3592ace69a919b3196420e56f09ce435302ea (patch)
treea77c774a1c5b3de183a3bf014aee8ff0bcf7096d /source3
parent8473764234bfec2f21b87ec69c213af4365749b4 (diff)
downloadsamba-50e3592ace69a919b3196420e56f09ce435302ea.tar.gz
samba-50e3592ace69a919b3196420e56f09ce435302ea.tar.bz2
samba-50e3592ace69a919b3196420e56f09ce435302ea.zip
s3:net: introduce a talloc stackframe for net idmap delete
this simplifies the freeing at the end Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_idmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c
index 1fb7be03cf..782b553749 100644
--- a/source3/utils/net_idmap.c
+++ b/source3/utils/net_idmap.c
@@ -426,7 +426,7 @@ done:
static
NTSTATUS dbwrap_delete_mapping(struct db_context *db, TDB_DATA key1, bool force)
{
- TALLOC_CTX* mem_ctx = talloc_tos();
+ TALLOC_CTX *mem_ctx = talloc_stackframe();
bool is_valid_mapping;
NTSTATUS status = NT_STATUS_OK;
TDB_DATA val1, val2;
@@ -483,8 +483,7 @@ NTSTATUS dbwrap_delete_mapping(struct db_context *db, TDB_DATA key1, bool force)
}
done:
- TALLOC_FREE(val1.dptr);
- TALLOC_FREE(val2.dptr);
+ talloc_free(mem_ctx);
return status;
}