commit 6f7046f4894e0a95cbbc85ae62c6c0b4d95ac43c
parent 597c5213fe05ec840f864a44136419dee8a1d2d8
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Fri, 17 Oct 2014 11:30:25 -0400
Fix Possible TLSF Edge Case
This may be fixing a bug generated by undefined behavior elsewhere in the zyn
source, but it should have no negative consequences if it is left in
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tlsf/tlsf.c b/tlsf/tlsf.c
@@ -561,6 +561,9 @@ static block_header_t* block_locate_free(control_t* control, size_t size)
{
mapping_search(size, &fl, &sl);
block = search_suitable_block(control, &fl, &sl);
+ if(block && !block->size)
+ block = NULL;
+
}
if (block)