(get_cached_stack): Don't crash if we first found a stack with a larger size then needed.

This commit is contained in:
Ulrich Drepper 2002-12-03 20:06:21 +00:00
parent 347ae8d421
commit 5cfc88a718

View File

@ -114,7 +114,8 @@ get_cached_stack (size_t *sizep, void **memp)
break;
}
if (result->stackblock_size > curr->stackblock_size)
if (result == NULL
|| result->stackblock_size > curr->stackblock_size)
result = curr;
}
}