s3: Fix a memleak in dbwrap_rbt.
authorMichael Adam <obnox@samba.org>
Fri, 27 Feb 2009 14:28:52 +0000 (15:28 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 19 Mar 2009 17:03:54 +0000 (18:03 +0100)
commit351b8d068fcbcbf3623e7658d698e612ab2f9533
tree645e5213083db31b86661d53535cac5d3fdd037f
parentb3aa6f0ccdf50eca5f5841ed9c8f85a4ac38f0a4
s3: Fix a memleak in dbwrap_rbt.

The SMB_MALLOC'ed rbt node data was not free'd on talloc free of
the db context. This is a quick fix using talloc instead of malloc
for allocation of the node data.

Since malloc was originally used for performance reasons, one
might want to reverse to malloc and create a talloc destructor
that walks the tree and frees all the node data if this talloc
approach proves to be too slow..

Michael

Signed-off-by: Michael Adam <obnox@samba.org>
source/lib/dbwrap_rbt.c