about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-03 20:06:21 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-03 20:06:21 +0000
commit5cfc88a71854ef17a4a0f3c761d2718fac827329 (patch)
treee16be3aad5bacbdfabbd4514446b3ef53b3d198e /nptl
parent347ae8d4216bca0003c8aa052e7b259e04bb7076 (diff)
downloadglibc-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')
-rw-r--r--nptl/allocatestack.c3
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;
 	}
     }