diff options
author | Jeremy Allison <jra@samba.org> | 2008-11-06 20:48:13 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-11-06 20:48:13 -0800 |
commit | 8962be69c700224983af4effd2cd086f7f5800b0 (patch) | |
tree | ad2149c31ca5102a213a13a75cd511b11c64d812 /source3/auth | |
parent | 7ae625345536572aa946f0715542a5cf2dbc2169 (diff) | |
download | samba-8962be69c700224983af4effd2cd086f7f5800b0.tar.gz samba-8962be69c700224983af4effd2cd086f7f5800b0.tar.bz2 samba-8962be69c700224983af4effd2cd086f7f5800b0.zip |
Make us clean under valgrind --leak-check=full by using talloc_autofree_context() instead of NULL.
Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting
to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should
be deleted when their parent context is deleted, so freeing them at some arbitrary point later
will be a double-free.
Jeremy.
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/token_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index e739fdaabe..6c00aa0943 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -102,7 +102,7 @@ NT_USER_TOKEN *get_root_nt_token( void ) uid_to_sid(&u_sid, pw->pw_uid); gid_to_sid(&g_sid, pw->pw_gid); - token = create_local_nt_token(NULL, &u_sid, False, + token = create_local_nt_token(talloc_autofree_context(), &u_sid, False, 1, &global_sid_Builtin_Administrators); token->privileges = se_disk_operators; |