diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-03 20:06:21 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-03 20:06:21 +0000 |
commit | 5cfc88a71854ef17a4a0f3c761d2718fac827329 (patch) | |
tree | e16be3aad5bacbdfabbd4514446b3ef53b3d198e /nptl/allocatestack.c | |
parent | 347ae8d4216bca0003c8aa052e7b259e04bb7076 (diff) | |
download | glibc-5cfc88a71854ef17a4a0f3c761d2718fac827329.tar.gz glibc-5cfc88a71854ef17a4a0f3c761d2718fac827329.tar.xz glibc-5cfc88a71854ef17a4a0f3c761d2718fac827329.zip |
(get_cached_stack): Don't crash if we first found a stack with a larger size then needed.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r-- | nptl/allocatestack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index e9e1cfd1cd..9f12f2b940 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -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; } } |