1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Volker Lendecke
1de9805fa3 Implement db_rbt_traverse 2009-08-08 13:44:31 +02:00
Michael Adam
fb70a8a255 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
2009-03-04 11:23:05 +01:00
Jelmer Vernooij
a52e729f30 Move rbtree.[ch] to lib/util. 2008-10-12 16:27:00 +02:00
Volker Lendecke
bdc9391021 Fix the build on FreeBSD 4.6.2
(This used to be commit 4f50cb63e9)
2008-06-19 12:02:12 +02:00
Volker Lendecke
541b8dec4e Add transactions to the dbwrap API
Only filled in for tdb so far, for rbt it's pointless, and ctdb itself needs to
be extended
(This used to be commit 0a55e018dd)
2008-03-10 21:08:44 +01:00
Volker Lendecke
4af27ec877 Restructure dbwrap_rbt
In this low-level code, play tricks to reduce the number of allocations to the
possible minimum. I would not recommend this for higher-level code, but here it
pays off.
(This used to be commit 71b1e6ff15)
2008-01-12 20:11:10 +01:00
Volker Lendecke
873b6f0f21 Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-716-g12cce3b
On Tue, Dec 18, 2007 at 06:04:32PM -0600, Jeremy Allison wrote:
>     Fix valgrind error in dbwrap_rbt where rec_priv->node was
>     being accessed after free. VALOKER PLEASE CHECK THIS VERY
>     CAREFULLY !!!! This is a correct fix in that it fixes the
>     valgrind error, but it looks inelegant to me. I think if
>     I understood this code better I could craft a more subtle
>     fix. Still looking at it....

Thanks a lot. Fully correct. What about the attached little
simplification?

Volker
(This used to be commit 5b72828600)
2007-12-19 10:16:43 -08:00
Jeremy Allison
c99dc69a45 We've finished with the old node once we've copied the
keyval.
Jeremy.
(This used to be commit 39f3efbcc5)
2007-12-18 17:30:02 -08:00
Jeremy Allison
537c4cf9cd Fix valgrind error in dbwrap_rbt where rec_priv->node was
being accessed after free. VALOKER PLEASE CHECK THIS VERY
CAREFULLY !!!! This is a correct fix in that it fixes the
valgrind error, but it looks inelegant to me. I think if
I understood this code better I could craft a more subtle
fix. Still looking at it....
Jeremy.
(This used to be commit 12cce3be2a)
2007-12-18 16:03:57 -08:00
Volker Lendecke
d5ab80054d dbwrap_rbt
This is meant as a replacement for the internal tdb. To me it seems a bit silly
that for in-memory structures we do our own memory management. With this rbt
based approach we can make use of the system-supplied malloc.
(This used to be commit 54e5d44046)
2007-12-10 16:06:32 +01:00