(get_cached_stack): Don't crash if we first found a stack with a larger size then needed.
This commit is contained in:
parent
347ae8d421
commit
5cfc88a718
@ -114,7 +114,8 @@ get_cached_stack (size_t *sizep, void **memp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result->stackblock_size > curr->stackblock_size)
|
if (result == NULL
|
||||||
|
|| result->stackblock_size > curr->stackblock_size)
|
||||||
result = curr;
|
result = curr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user