aboutsummaryrefslogtreecommitdiff
path: root/htl
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-02 01:01:28 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-02 11:36:10 +0100
commit3a614f39e61140dd2478ce5b7564ec8a53269ea4 (patch)
tree6e170335e304f32cd2704eb1cf13f2cd56cf32ed /htl
parenta09183aed7bb8ace211e042b2e6e982bcc004957 (diff)
downloadglibc-3a614f39e61140dd2478ce5b7564ec8a53269ea4.zip
glibc-3a614f39e61140dd2478ce5b7564ec8a53269ea4.tar.gz
glibc-3a614f39e61140dd2478ce5b7564ec8a53269ea4.tar.bz2
htl: Check error returned by __getrlimit
Diffstat (limited to 'htl')
-rw-r--r--htl/pt-create.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/htl/pt-create.c b/htl/pt-create.c
index 5d37edb..d3847b6 100644
--- a/htl/pt-create.c
+++ b/htl/pt-create.c
@@ -136,8 +136,8 @@ __pthread_create_internal (struct __pthread **thread,
if (stacksize == 0)
{
struct rlimit rlim;
- __getrlimit (RLIMIT_STACK, &rlim);
- if (rlim.rlim_cur != RLIM_INFINITY)
+ err = __getrlimit (RLIMIT_STACK, &rlim);
+ if (err == 0 && rlim.rlim_cur != RLIM_INFINITY)
stacksize = rlim.rlim_cur;
if (stacksize == 0)
stacksize = PTHREAD_STACK_DEFAULT;