projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84a19b9
)
tdb2: make valgrind happier.
author
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 3 Sep 2010 12:58:43 +0000
(22:28 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 3 Sep 2010 12:58:43 +0000
(22:28 +0930)
ccan/tdb2/tdb.c
patch
|
blob
|
history
diff --git
a/ccan/tdb2/tdb.c
b/ccan/tdb2/tdb.c
index 54ab06b8fba5ccedd69774a05f122274259311ad..40811c2eff83609ca2c55d757815e2a0cae9f9d1 100644
(file)
--- a/
ccan/tdb2/tdb.c
+++ b/
ccan/tdb2/tdb.c
@@
-185,6
+185,9
@@
static int tdb_new_database(struct tdb_context *tdb)
newdb.h.free[bucket] = offsetof(struct new_database, h.frec);
newdb.h.frec.next = newdb.h.frec.prev = 0;
+ /* Clear free space to keep valgrind happy, and avoid leaking stack. */
+ memset(newdb.space, 0, sizeof(newdb.space));
+
/* Tailer contains maximum number of free_zone bits. */
newdb.tailer = INITIAL_ZONE_BITS;