projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d514264
)
if pthread_create fails, it must not attempt mmap if there is no mapping
author
Rich Felker
<dalias@aerifal.cx>
Sat, 2 Feb 2013 03:23:24 +0000
(22:23 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 2 Feb 2013 03:23:24 +0000
(22:23 -0500)
this bug was introduced when support for application-provided stacks
was originally added.
src/thread/pthread_create.c
patch
|
blob
|
history
diff --git
a/src/thread/pthread_create.c
b/src/thread/pthread_create.c
index 4c1decaa7ce5f660ace954a032fcd88751e603d6..1e55a6f944a26987f783a5cdef19454655b02c7b 100644
(file)
--- a/
src/thread/pthread_create.c
+++ b/
src/thread/pthread_create.c
@@
-188,7
+188,7
@@
int pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict attrp
if (ret < 0) {
a_dec(&libc.threads_minus_1);
- munmap(map, size);
+
if (map)
munmap(map, size);
return EAGAIN;
}