projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81defbc
)
alloc: fix uninitialized entry (thanks valgrind!)
author
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 25 Sep 2010 12:34:16 +0000
(22:04 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 25 Sep 2010 12:34:16 +0000
(22:04 +0930)
ccan/alloc/alloc.c
patch
|
blob
|
history
diff --git
a/ccan/alloc/alloc.c
b/ccan/alloc/alloc.c
index 8e0b72aa0432227990f7b053f6620020fd53dcac..6cd96d8d8a3681713273f3ed45f8bcea59f49281 100644
(file)
--- a/
ccan/alloc/alloc.c
+++ b/
ccan/alloc/alloc.c
@@
-489,6
+489,8
@@
static unsigned long break_up_large_page(struct header *head,
for (i = 1; i < SMALL_PAGES_PER_LARGE_PAGE; i++) {
struct page_header *ph = from_pgnum(head, lpage + i, sp_bits);
+ /* Initialize this: huge_alloc reads it. */
+ ph->elements_used = 0;
add_small_page_to_freelist(head, ph, sp_bits);
}