Make us clean under valgrind --leak-check=full by using talloc_autofree_context(...
authorJeremy Allison <jra@samba.org>
Fri, 7 Nov 2008 04:48:13 +0000 (20:48 -0800)
committerJeremy Allison <jra@samba.org>
Fri, 7 Nov 2008 04:48:13 +0000 (20:48 -0800)
commit8962be69c700224983af4effd2cd086f7f5800b0
treead2149c31ca5102a213a13a75cd511b11c64d812
parent7ae625345536572aa946f0715542a5cf2dbc2169
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.
14 files changed:
source3/auth/token_util.c
source3/lib/memcache.c
source3/lib/util.c
source3/lib/util_pw.c
source3/param/loadparm.c
source3/passdb/passdb.c
source3/passdb/pdb_interface.c
source3/passdb/util_unixsids.c
source3/smbd/server.c
source3/smbd/uid.c
source3/utils/net_sam.c
source3/utils/pdbedit.c
source3/utils/smbpasswd.c
source3/web/cgi.c