aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-03-27 12:01:36 +0000
committerEvan Huus <eapache@gmail.com>2013-03-27 12:01:36 +0000
commit7959275717940da05fcc4d14fb3aa1cc65e55b94 (patch)
tree502f08aad3985fa526ec076d59b1e69cfaaba89a
parent3d07727dc878aacbf29ec6c116f8fd2378c1fff8 (diff)
Copy over a missing flag in the block allocator to fix the build-bot failure
at http://buildbot.wireshark.org/trunk/builders/Ubuntu-12.04-x64/builds/4250 Adding --verbose to get the random seed has payed off already! svn path=/trunk/; revision=48584
-rw-r--r--epan/wmem/wmem_allocator_block.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/wmem/wmem_allocator_block.c b/epan/wmem/wmem_allocator_block.c
index 08a1e490dc..f31a898328 100644
--- a/epan/wmem/wmem_allocator_block.c
+++ b/epan/wmem/wmem_allocator_block.c
@@ -759,8 +759,14 @@ wmem_block_realloc(void *private_data, void *ptr, const size_t size)
wmem_block_split_free_chunk(allocator, tmp, split_size);
- /* Now update our 'next' count and our successor's 'prev' count */
+ /* Now do a 'quickie' merge between the current block and the left-
+ * hand side of the split. Simply calling wmem_block_merge_free
+ * might confuse things, since we temporarilly may have two blocks
+ * to our right that are both free (and it isn't guaranteed to
+ * handle that case). Update our 'next' count and last flag, and
+ * our (new) successor's 'prev' count */
chunk->len += tmp->len;
+ chunk->last = tmp->last;
tmp = WMEM_CHUNK_NEXT(chunk);
if (tmp) {
tmp->prev = chunk->len;