s3: Fix a memleak in dbwrap_rbt.
commit13321351d2184146a40f36f0085cc66181c62926
authorMichael Adam <obnox@samba.org>
Fri, 27 Feb 2009 14:28:52 +0000 (27 15:28 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 27 Mar 2009 13:15:38 +0000 (27 14:15 +0100)
treed78e28abb47e3c1f3ddd85b9e2c87b7786647317
parenteb430f51551f2986c7b30d25edeba64ea01b5109
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>
(cherry picked from commit 6facbbb4020369c18b4312115fab9b8d6eceaf80)
source/lib/dbwrap_rbt.c