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