diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-02 17:22:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-02 17:22:00 -0700 |
commit | d2b60d1311f15ebf45eff760e4815b009f6c1367 (patch) | |
tree | fe287879ac53af66fe9dd31d9c5796bf07b00820 /allocate.c | |
parent | Start work on proper scoping with multiple files (diff) | |
download | sparse-d2b60d1311f15ebf45eff760e4815b009f6c1367.tar.gz sparse-d2b60d1311f15ebf45eff760e4815b009f6c1367.tar.bz2 sparse-d2b60d1311f15ebf45eff760e4815b009f6c1367.zip |
When dropping all allocations, clear the freelist too
Otherwise we're in trouble when we try to use a "free" entry that
already got its backing store removed.
Diffstat (limited to 'allocate.c')
-rw-r--r-- | allocate.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -35,6 +35,7 @@ void drop_all_allocations(struct allocator_struct *desc) desc->allocations = 0; desc->total_bytes = 0; desc->useful_bytes = 0; + desc->freelist = NULL; while (blob) { struct allocation_blob *next = blob->next; blob_free(blob, desc->chunking); |