diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 14:33:51 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-07 14:33:51 +0100 |
commit | b3c9249500d1f6f2df42c1543c4deb87789510b5 (patch) | |
tree | 68c800f62a1d0ac2ce06efbffcb94e5ab6b49127 /sys/src/libc/port/malloc.c | |
parent | a92ffdbbfb3157d6fef23e3a8901c7ecdea68f1b (diff) | |
parent | 4d22dbb0f5a0cd4d3202a01a8cc18b632b5c9b01 (diff) |
merge
Diffstat (limited to 'sys/src/libc/port/malloc.c')
-rw-r--r-- | sys/src/libc/port/malloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/libc/port/malloc.c b/sys/src/libc/port/malloc.c index 907bfa8a6..d738cc4b9 100644 --- a/sys/src/libc/port/malloc.c +++ b/sys/src/libc/port/malloc.c @@ -99,13 +99,13 @@ checkenv(void) { int n, fd; char buf[20]; - fd = open("/env/MALLOCFD", OREAD); + fd = open("/env/MALLOCFD", OREAD|OCEXEC); if(fd < 0) return -1; - if((n = read(fd, buf, sizeof buf)) < 0) { - close(fd); + n = read(fd, buf, sizeof buf); + close(fd); + if(n < 0) return -1; - } if(n >= sizeof buf) n = sizeof(buf)-1; buf[n] = 0; |